On 30/07/2008, at 10:08 PM, [EMAIL PROTECTED] wrote:

Hi there.

My application uses a NSStatusItem. When somebody left-clicks on it I want a method to be called (Which I've managed to fix) and then when somebody right-clicks on it I want a menu to be shown. I can't seem to get that to
work. If I set a menu for the status item it shows up when somebody
left-clicks on it and the other method isn't called.

How do I fix it so that when somebody right-clicks on it, the menu shows
and when somebody left-clicks on it the other method is called?

Any help is appreciated.

/Tim Andersson

What you want is called a contextual menu. Find out how to implement it here: <http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/ Articles/DisplayContextMenu.html>
There's even some sample code snippets.

Ron
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to