Menu Builder

Pete pete at mollysrevenge.com
Thu Jan 12 15:18:33 EST 2012


Thanks Jacque.  I did try the short name of the target and it returned the
name of the menu bar group, as did the short name of me.

After looking at the logic of what I'm trying to do, I think there's
another place I can do the adjust the menu contents and drop the whole
mouseDown approach.  Feels cleaner that way.

On Thu, Jan 12, 2012 at 11:43 AM, J. Landman Gay
<jacque at hyperactivesw.com>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         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list