• 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
Re: How to open two nibs at app launch ? Beginners question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to open two nibs at app launch ? Beginners question


  • Subject: Re: How to open two nibs at app launch ? Beginners question
  • From: Mario Kušnjer <email@hidden>
  • Date: Mon, 13 Apr 2009 10:14:04 +0200


On 2009.04.13, at 05:40, Quincey Morris wrote:

It's not wrong at all. Separate nibs are the recommended way of doing this.


You may just need to tell your window controller to display its window. Trying adding:

	[myWindowController showWindow: nil];

after you've initialized your window controller.

Incidentally, in a non-document-based application (as your appears to be), a good place to put code to create your window controller would be in your application delegate's applicationDidFinishLaunching: method. You say you created a window controller. Where *did* you put that code?

Well I did a subclass of NSWindowController in separate file MainWindowController.


But I actually don't understand those application delegate's concept.
How do I make something to delegate to something else (did I even get that right ?) ?


Application delegate would be (in my case) an object added in MainMenu.nib that would have MainWindowController class set to it ?
And MainWindow.nib File's Owner is also set to MainWindowController, right ?
That would be the connection between MainWindow.nib file and the code to instantiate my window controller.
I'm not sure I doing it right !


So I should put applicationDidFinishLaunching (that would be instance ?) method in MainWindowController class and inside instantiate my window controller ?

Thanks for answering !

Mario _______________________________________________

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


  • Follow-Ups:
    • Re: How to open two nibs at app launch ? Beginners question
      • From: Quincey Morris <email@hidden>
References: 
 >How to open two nibs at app launch ? Beginners question (From: Mario Kušnjer <email@hidden>)
 >Re: How to open two nibs at app launch ? Beginners question (From: Quincey Morris <email@hidden>)

  • Prev by Date: static vs non-static. Recommendation needed.
  • Next by Date: Re: How to open two nibs at app launch ? Beginners question
  • Previous by thread: Re: How to open two nibs at app launch ? Beginners question
  • Next by thread: Re: How to open two nibs at app launch ? Beginners question
  • Index(es):
    • Date
    • Thread