[fixed] Open a window created in another nib
[fixed] Open a window created in another nib
- Subject: [fixed] Open a window created in another nib
- From: Andrea Salomoni <email@hidden>
- Date: Wed, 28 Dec 2005 11:56:18 +0100
Thank you all,
I fixed the problem loading the nib file inside the windowcontroller
and using file's owner window outlet connection.
Only a question.... (very stupid I know)
Where Can I find deep documentation about File's owner... I think is
something like a proxy object...
Andrea
Il giorno 28/dic/05, alle ore 11:30, mmalcolm crawford ha scritto:
On Dec 28, 2005, at 2:02 AM, Andrea Salomoni wrote:
I created MYWindowController class as a subclass of
NSWindowController yet, the problem is that if I write
NSLog (@"window name:%@", [self window]);
returns nil...
That's almost certainly because it hasn't loaded the nib file...
You should initialise theSecondWin with initWithWindowNibName: --
see <http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSWindowController.html#//
apple_ref/occ/instm/NSWindowController/initWithWindowNibName:>
Also, again, you don't instantiate an instance of the window
controller in a nib, it should be the File's Owner -- you set the
class of the File's Owner to be your NSWindowController subclass.
See <http://developer.apple.com/documentation/Cocoa/Conceptual/
Documents/Concepts/WinControllersAndNibs.html>.
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40metagraphics.it
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden