On Jun 13, 2007, at 6:15 AM, Godwin, Mark R wrote:
Hi All,
I need to get a notification from a pop-up button when it has been
changed, i.e. when the user selects an item from the pop-up
button’s menu, but I don’t want to use the ‘Command’ generated from
the menu item itself (as they are dynamically genereated, and don’t
have Commands). Instead, I want the index of the item selected and
the Pop-up control ref to identify the control.
FWIW, you could still use a kEventCommandProcess handler. Give all
the items the same command (0 or something else) and get the menu
information from within the handler. Each popup's menu could have its
on menu ID. Do you really need the ControlRef?
Larry
I’ve experimented with the kEventMenuClosed event, which seems to
almost work, but the Control Value of the control when this event
is processed has not been updated to the new value yet.
I assume there must be an event, (in kEventClassControl?) which the
control itself is handling to know when to redraw, change the
active item, etc., but I can’t find out what that message is. I’m
guessing I have to install an event handler for this message, and
then call CallNextEventHandler() to pass the message through to the
control, before calling GetControl32BitValue() to get the updated
value.
Any clues would be much appreciated.
Thanks in advance,
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden