Re: Split MainMenu.nib
Re: Split MainMenu.nib
- Subject: Re: Split MainMenu.nib
- From: Christiaan Hofman <email@hidden>
- Date: Mon, 15 Nov 2010 00:20:55 +0100
On Nov 14, 2010, at 23:48, gMail.com wrote:
> Hi, on IB, I would like to move 2 objects
> MyInspector (NSObject - blue cube)
> NSWindow linked to the MyInspector
> from the MainMenu.nib to a brand new Inspector.xib file.
> And I would like to get rid of the blue cube "MyInspector ". Instead I would
> like to make the File's Owner (transparent cube) the new MyInspector. The
> problem is that I lose the connection to all the 400 IBOutlets.
>
> Is a way to make the transparent cube the MyInspector objects, already
> connected to all the outlets? Any idea?
>
> -- Leonardo
No, unfortunately there's no way to replace the targets of all your IB connections by another object, other than changing them one-by-one. You either the whole package of object and target, or you lose the connections.
Of course I don't know your design, but 400 outlets sounds like really a lot, I have never come even remotely close to that. It sounds like a bad design, I wonder if you cannot somehow redesign your object model.
Also, if you weren't already doing this, I strongly advice you make your MyInspector a subclass of NSWindowController (generally nib owners should be subclasses of one of the Cocoa nib owning classes NSWindowController, NSViewController, or NSDocument, with the exception of MainMenu).
Also for the next time, always try to move windows (and separately loaded views) into their own NIBs as a matter of principle. You've discovered an important reason why.
Christiaan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden