really i realize the design is not optimal but it can not be changed at this time. i need to make it work the way it is. please use that as the starting assumption. (telling someone to change their design more frustrating than actually helpful)

if you care, the menu in the menu bar has 30 items in it, the first 5 have keyboard shortcuts and enablement set to look nice. the rest of the items EACH have their OWN sub-menu, some with a dozen items in it. so "borrowing" is the rational choice, rather than duplicating all those menus AND sub menus and the nice keyboard shortcut glyphs etc etc. it is NOT a light-weight menu.

anyway i figured it out.

the logic went like this

start context menu
menu "about to show" callback
        remove menu from menu bar
        insert it into context menu
user tracks context menu
menu "done showing" callback:
        remove menu from context
        put it back in menu bar
menu action would be called here, but menu is GONE!  HAHA!
end context menu

new logic:
start context menu
menu "about to show" callback
        remove menu from menu bar
        insert it into context menu
user tracks context menu
menu "done showing" callback:
        post an event saying "put stuff back later"
--> menu action !! YES!
end context menu
"put stuff back later" callback:
        remove menu from context
        put it back in menu bar


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to