JonathanT324
Nov 29 2004, 06:16 PM
I know add-ins aren't supported, but I was hoping someone else here with more javascript experience than I might know a workaround.
I'm trying to use the expandmenu() function to automatically open a menu that I'm building witht the Collapsible Menu add-in, and I can't get it to work for menus with names that include semicolons, like "» Services" (& raquo;).If I remove the double-right arrow, it works fine. Otherwise, I get an error that says, "'null' is null or not an object."
I'm guessing that the problem is that the semicolon is making the JS think a line of code is ending prematurely.
Any workarounds? Or do I have to change the names?
Thanks,
Jonathan
xfx
Nov 29 2004, 08:33 PM
Jonathan,
Have you tried using & raquo; instead of » when passing the caption to the ExpandMenu function?
JonathanT324
Nov 29 2004, 08:50 PM
Thanks for replying so quickly. I have tried that way and it still doesn't work. I know that in other languages you need to write certain characters like quotation marks or semicolons a different way in the code. I think in AppleScript you need to write quotes like: /"Hi!/" , for example, but I don't know if JavaScript has anything similar or even if that's the problem.
Thanks,
Jonathan
xfx
Nov 30 2004, 01:15 PM
Jonathan,
Can you please post your .dmb project so I can run some tests?
JonathanT324
Nov 30 2004, 01:25 PM
Sure, thanks for taking a look at it.
xfx
Nov 30 2004, 07:38 PM
Well, guess what... I tried it using:
CODE
ExpandMenu("» Services");
And it worked... go figure!
It looks like DMB "understands" what "»" is and changes it for "»" when it compiles the project.
JonathanT324
Nov 30 2004, 07:44 PM
Thanks! That worked perfectly!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.