Re: Interface Builder : moving a controller to File's Owner
Re: Interface Builder : moving a controller to File's Owner
- Subject: Re: Interface Builder : moving a controller to File's Owner
- From: David Geldreich <email@hidden>
- Date: Fri, 5 Mar 2010 13:23:01 +0100
Le 5 mars 10 à 11:48, email@hidden a écrit :
Including the window controller in the nib is a non standard approach.
I am maintaining this software, that's why I want to move to the
"standard approach".
1. Decompose your monster nib as required.
2. In IB select Files's Owner and display the Identity Inspector.
3. Set the class to that of your custom window controller.
4. Now hook up your nib targets and actions to the File's Owner.
The problem is precisely 4), how do I move all the connections (like
80 or more) that were done between WindowController and Window, so
they are between File's Owner and Window ?!
I normally then define an -init method on my window subclass.
When the window controller is instantiated it loads the nib with
self as file's owner.
- (id)init
{
self = [super initWithWindowNibName:@"MyWindowNib"];
return self;
}
That is what I also do... but when you maintain an application, you
have to do with what's there.
Regards.
David._______________________________________________
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