A curious fact about menuPick handlers
Graham Samuel
graham.samuel at blueyonder.co.uk
Wed Mar 16 06:58:50 EST 2005
I'm debugging a menu, and I made the mistake of not catching a
particular menuItem - i.e. there was no specific case for this item in
my switch statement in my menuPick handler, and I didn't have a default
case statement (why would I?).
I put a breakpoint on the first line of the menuPick handler, i.e. at
on menuPick
but when I invoked the menuItem that wasn't allowed for in my switch
statement, the handler never fired at all, so I couldn't see what was
wrong. Absolutely nothing happened - it's as if the engine had done a
quick scan of the menu items and said "this guy doesn't know what to do
with this item so I won't even start the handler". When I put a default
case in with a breakpoint, then the script opened for debugging at that
point.
I guess it's obscure, but I did not expect this to happen: maybe other
people might get caught the same way.
Graham
------------------------------------------------------------------------
---
Graham Samuel / The Living Fossil Co. / UK and France
More information about the use-livecode
mailing list