• 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: Loading a nib for a new window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading a nib for a new window


  • Subject: Re: Loading a nib for a new window
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 13 Jul 2002 08:42:41 -0700

On Wed, 10 Jul 2002 22:04:25 -0700, Andrew Merenbach <email@hidden> said:

>
>I'm working on a program with one main window and about twenty other
>windows (each of which is accessed from both a popup menu and a menu in
>the menu bar). Each window is in a separate nib file for ease of
>maintenance. I would like some guidance as to what I should do from
>there. From what I've read so far it looks like I should be loading the
>nibs dynamically, but that's all I can figure out

Read the documentation files NSWindowController.html and
WinControllersAndNibs.html.

Basically, the architecture is this. You make an NSWindowController
subclass for each nib. Within each nib (i.e. in IB), you hook up the File's
Owner to the appropriate NSWindowController subclass, and its window outlet
to the main window of that nib. Now you're good to go. When your code
allocs an NSWindowController of the correct subclass and says
initWithWindowNibName to it, the nib is loaded; when your code releases
that instance, the nib is unloaded.

m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Getting the contenst of a mount point with a NSFileWrapper
  • Next by Date: [OT] Quartz Extreme in developer previews?
  • Previous by thread: Re: Loading a nib for a new window
  • Next by thread: Re: NSWindow not restoring location
  • Index(es):
    • Date
    • Thread