Ooooh good tip on locking menus! <where is that keepers file...>

Bob


On Jan 12, 2012, at 11:43 AM, J. Landman Gay wrote:

> On 1/12/12 1:01 PM, Pete wrote:
> 
>> There's more than one menu I have to dynamically adjust so I need to figure
>> out in the group's mouseDown handler which menu was clicked.  I tried using
>> the short name of me, the short name of the target, and the mouseControl
>> but none of them tell me which button was clicked.  How do I figure that
>> out?
> 
> I usually don't bother, though the "short name of the target" should work I'd 
> think. I just set everything all at once. Some of my menu handlers are fairly 
> long but they still run almost instantly. Manipulating menus is expensive, so 
> it's a good idea to lock menus before changing things and then unlock menus 
> at the end of the handler.
> 
> on mousedown
> lock menus
> put blahblah into btn "file" of me
> put somethingelse into btn "edit" of me
> unlock menus
> end mousedown
> 
>> 
>> The other issue is what needs to be done for Windows.  I think I'm right in
>> saying that the mouseDown event will reach the menu bar group if there is
>> no mouseDown handler for the button itself - right?
> 
> Yes. Messages will pass through the hierarchy normally, so you get automatic 
> cross-platform behavior.
> 
> -- 
> Jacqueline Landman Gay         |     jac...@hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to