• 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 load a window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to load a window


  • Subject: Re: How to load a window
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 21 Sep 2008 15:26:56 -0700

On Sep 21, 2008, at 1:53 PM, Eric Lee wrote:

My question is simple (and probably basic from some of you experts :S). How do you load another window just by pressing a button?

On CocoaDevCentral, they say to use NSBundle, but I read on the documentation that you can also use NSWindowController?

You might be misled by the term "load." You can load a nib that has an instance of NSWindow in it, and then show that window. Alternately, you can create a window programmatically, and then show that window. In both cases what you're doing with the window is "showing" it.


Generally with NSWindowController, you will initialize an instance with a nib containing a window and whose File's Owner is that NSWindowController, and then ask that instance to show its window.

  -- Chris

_______________________________________________

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


References: 
 >How to load a window (From: Eric Lee <email@hidden>)

  • Prev by Date: Re: fullscreen quicktime across multiple monitors
  • Next by Date: How do I get CAScrollLayer to draw its sublayers
  • Previous by thread: Re: How to load a window
  • Next by thread: How to load a window
  • Index(es):
    • Date
    • Thread