Determining which menu button was clicked on Mac
Trevor DeVore
lists at mangomultimedia.com
Wed Jan 7 20:01:51 EST 2004
On Jan 7, 2004, at 5:46 PM, Dar Scott wrote:
>
> On Wednesday, January 7, 2004, at 04:53 PM, Trevor DeVore wrote:
>
>> Though it probably wasn't clear in my original post I would like the
>> actual button "File, Edit, Help, etc." that is being clicked. I have
>> one menu button in particular whose values are determined by calls to
>> an external. I would prefer not to call the external function every
>> time the user clicks on the menu as a group, just when they click on
>> one menu item in particular.
>
> Rats, Trevor, I'm being dense. It is still not clear to me.
>
> What are you doing in menuPick?
Alright, here are all the gory details :-)
My project has a stack with a player object that audio files are loaded
into for playback while viewing certain content in another stack. One
of the program menus is named "Audio". When the user clicks on the
"Audio" menu a script uses my QT external to check if the player object
is currently playing or stopped. The first menu item changes to 'Play'
or 'Pause' accordingly. The change of text needs to happen in the
mouseDown event, before the menu is displayed to the user. Currently I
call the external every time the user clicks on any application menu
(by handling mouseDown in the group script). I would prefer to only
call it when the "Audio" menu is clicked on.
--
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com
More information about the use-livecode
mailing list