NSWindowController, owner, "primary window"...
NSWindowController, owner, "primary window"...
- Subject: NSWindowController, owner, "primary window"...
- From: Gerd Knops <email@hidden>
- Date: Wed, 20 Aug 2008 13:39:07 -0500
I have a NSWindowController subclass managing a window and some
functionality in that window. Now at some point I need to display a
sheet, which is a window in a different nib.
I'd like to use another NSWindowController to load that nib file,
mainly so it will take care of (eg release) all the top level objects
in that second nib.
The bindings in the second nib need to access objects in my above
mentioned NSWindowController subclass, so I'd like that to be the
owner. Now when I instantiate the second NSWindowController using
'initWithWindowNibName:owner:', what do I do with the window
containing the sheet? I can't hook it up to the file's owner window
outlet, as that is already in use for the primary window.
So I basically have no (elegant) way of telling the second window
controller what it's window is, or am i missing something? The
NSWindowController has this vague notion of "primary window", but
doesn't really explain what happens when
'initWithWindowNibName:owner:' is used.
Is there some magic that allows 'initWithWindowNibName:owner:' to
figure out what the window is? Or does one have to use 'setWindow:' to
set the window when the above initializer is used?
Gerd
_______________________________________________
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