Re: Application Menu - Preferences
Re: Application Menu - Preferences
- Subject: Re: Application Menu - Preferences
- From: Paul Bruneau <email@hidden>
- Date: Wed, 24 Feb 2010 16:20:38 -0500
On Feb 24, 2010, at 3:58 PM, David Blanton wrote:
Good Tip. Thanks.
What I was really getting at is how to set the target / action for
when the item is selected. Here is what I did, so if this is way
off base please let me know.
I sub-classed NSMenuItem and set the Preferences menu item to this
class.
In the awakeFromNib I set the target and action.
Am I doing too much? Is there a 'less code' approach?
Yes & yes. The page I linked for you has it. Scroll down to Figure 9.
All you need to do is control-drag from the Preferences menu item down
to your pref panel as shown.
No subclassing, no code
http://developer.apple.com/cocoa/cocoabindings.html
_______________________________________________
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