Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some autotexts not accepted...
#1
I'm find the autotext feature VERY useful and have several items working fine.
Unfortunately there's a problem that I've seenvwith 2 new macros now where the syntac check highlights the macro as invalid.

for example,in this code
Code:
Copy      Help
            tt["#fa"] = o => o.Menu(        // floskeln....APL
                new ("testing","hello world!"),
            );

the new(..) is underlined in red with a popup saying "there is no target type for new(string,string) which I find "surprising" because I have x other lines following exactly the same pattern that cause no problems. (even copying the "header lines" with tt from another shortcut does not help...so this is confusing.
Unfortunately there's too much personal data in this file for me to share it - so I'm not sure how I could document this in a reproduceable way...
#2
It happens when there is single item. C# compiler cannot resolve the type of the expression.

Two ways to solve it:
Code:
Copy      Help
        tt["#fa"] = o => o.Menu(
            new TAMenuItem("Label example", "TEXT") //the TAMenuItem specifies the type
            );

        tt["#fa"] = o => o.Menu([ //the [ ] specifies that it's an array
            new("Label example", "TEXT")
            ]);
#3
Ah, thanks!  I actually had one item that had 5 entries and "suddenly" (after a recent upgrade, but I don't recall which one) it also had its entries highlighted with the same message. Following your advice I added TAMenuItem and that fixed it.


Forum Jump:


Users browsing this thread: 1 Guest(s)