On Feb 20, 2009, at 9:17 AM, Marshall Houskeeper wrote:

I have setup a contextual menu in interface builder that sends an action to my controller. I have several similar views that will have the same contextual menu. When I invoke the contextual menu, the controller's IBAction function gets called as expected. The sender passed to the functions is a NSMenuItem. How do I determine which view invoked the contextual menu action?

It seems to me that you need separate instances of the menu for each view, rather than sharing the same instance among all the views. You can either connect the view to the menu in IB, or set the menu items' represented object to the view.

Ross
_______________________________________________

Cocoa-dev mailing list ([email protected])

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