• 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: NSApplication's behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplication's behavior


  • Subject: Re: NSApplication's behavior
  • From: Jonathan Hess <email@hidden>
  • Date: Thu, 1 Oct 2009 01:26:07 -0700

On Sep 30, 2009, at 7:50 PM, Mark Hurley wrote:

> Still learning the Cocoa Window Architecture...
> Goal:  I want to separate my MainWindow out of MainMenu.xib into its own
> .xib:  MainView.xib.
>
> 1) I create a new Cocoa Application (not document-based)
>
> 2) I create a MainWindow.xib and MainWindowController.h/.m setting
> appropriately the relationship between them.  MainWindowController inherits
> from NSWindowController and follows the proper procedures of fixing the
> "MainWindow" in the init* methods as mentioned in Apple docs.  I also set
> the window and delegate
>
> My assumption (based on docs) is that my default or main NIB to be loaded is
> the one that has NSApplication set as the File's Owner.  And this should
> remain as MainMenu, to ensure the responders for the Menu's are properly
> registered/set up.
>
> What is the recommended way to move MainWindow in another NIB? Shall I
> instantiate it from applicationDidFinishLaunching? Is there another way
> through interface builder, where one NIB refers to the other, etc?

Instantiating your MainWindowController controller in your Application Delegate's implementation of applicationDidFinishLaunching sounds like a solid approach to implementing this factoring.

Jon Hess

>
> Thank you,
>
> Mark
> _______________________________________________
>
> 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

_______________________________________________

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

  • Prev by Date: Cannot get pixel color from NSBitmapImageRep
  • Next by Date: Re: Cannot get pixel color from NSBitmapImageRep
  • Previous by thread: Re: [Enigmatic semi-solution] Re: Cannot get pixel color from NSBitmapImageRep
  • Next by thread: Re: [iPhone] Application running for the very first time...
  • Index(es):
    • Date
    • Thread