How to hook up IB actions to existing object (like File's Owner)?
How to hook up IB actions to existing object (like File's Owner)?
- Subject: How to hook up IB actions to existing object (like File's Owner)?
- From: Sidney San MartÃn <email@hidden>
- Date: Wed, 15 Apr 2009 17:08:10 -0400
I want to hook up actions and bindings in a nib (loaded with
+[NSBundle loadNibNamed:owner:]) to an object other than File's Owner
(one which will already exist when the nib is loaded). Can I create a
reference to a second object in Interface Builder without causing it
to be instantiated and hook it up at runtime, in the style of File's
Owner?
Or, am I going about this the wrong way? I have an NSStatusItem which
started out managed by my application controller. It's getting
complicated, and I was planning to move it to its own nib and move
control over it to a new object. Problem is, it still needs actions
and bindings in the application controller. I could always instantiate
my menu controller in the nib and make it's owner the app controller,
but the above feels much cleaner. Is there an option I'm not thinking
of?
_______________________________________________
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