Popup Behavior
Popup Behavior
- Subject: Popup Behavior
- From: Lorenzo <email@hidden>
- Date: Tue, 03 Jul 2007 00:45:54 +0200
I am building my own popup menu.
I click on my "popup" icon and I display a window containing several
buttons. When I rollover the buttons I get a nice effect. When I click on a
button I execute a command then I close the window. Cool, it works pretty
well. But...
When I click on the "popup" icon and release the mouse button, my window has
to remain on the screen, exactly as when you click on a menu bar item then
release the mouse button and you can still select a menu item from the menu.
Then at the next click I have to close that window. To do that I check the
sendEvent API in my NSApp class, and if I detect a NSLeftMouseDown I close
the window. The problem is that if I call a menu item in my application, for
example I open a document, that click on the menu item is not a
NSLeftMouseDown event. More, I realized that many other events should close
that window. For example, when I activate a different application.
Is anyone who exactly knows which events should close that window?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden