• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[fixed] Open a window created in another nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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
  • Follow-Ups:
    • Re: [fixed] Open a window created in another nib
      • From: mmalcolm crawford <email@hidden>
References: 
 >Open a window created in another nib (From: Andrea Salomoni <email@hidden>)
 >Re: Open a window created in another nib (From: mmalcolm crawford <email@hidden>)
 >Re: Open a window created in another nib (From: Andrea Salomoni <email@hidden>)
 >Re: Open a window created in another nib (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Newbie #import confusion...
  • Next by Date: Re: [fixed] Open a window created in another nib
  • Previous by thread: Re: Open a window created in another nib
  • Next by thread: Re: [fixed] Open a window created in another nib
  • Index(es):
    • Date
    • Thread