Le 5 mars 10 à 11:48, jonat...@mugginsoft.com 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 (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 arch...@mail-archive.com

Reply via email to