• 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: Multi windows in Document-based app, but 1 Nib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi windows in Document-based app, but 1 Nib


  • Subject: Re: Multi windows in Document-based app, but 1 Nib
  • From: Walt Horat <email@hidden>
  • Date: Thu, 5 Apr 2007 15:23:09 -0700

Todd-

You can put all the windows you want into a nib.

The tradeoff is that a nib file is a freeze dried set of objects in memory - when you load a NIB you load everything inside of it. In theory you save on memory footprint when you only load NIBs when they are required (i.e. why load the about box until/if and when the user asks you to display it).

That being said, it seems that a lot of the time your application data footprint will be far larger than your gui objects, so in some cases this probably does not matter.

HTH,


Walt -----

On Apr 5, 2007, at 2:53 PM, Todd Heberlein wrote:

All the documentation for Document-based applications indicate that if you want multiple windows displaying different aspects of a single document (e.g., multiple views of a CAD model), then you should subclass NSWindowController, and then have each NSWindowController subclass load up a separate NIB in the makeWindowControllers method.

QUESTION: Why can't I just put multiple windows in the main/ original Nib (i.e., MyDocument.nib)?

Will something break if I do (now or down the road with future OS or X-Code releases)? What I want to do is have a primary window representing the model/document, and then multiple (but optional) non-editable windows showing different (graphical) views on the same data.

Thanks,

Todd

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40soundflavor.com


This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Multi windows in Document-based app, but 1 Nib (From: Todd Heberlein <email@hidden>)

  • Prev by Date: Multi windows in Document-based app, but 1 Nib
  • Next by Date: Re: Multi windows in Document-based app, but 1 Nib
  • Previous by thread: Multi windows in Document-based app, but 1 Nib
  • Next by thread: Re: Multi windows in Document-based app, but 1 Nib
  • Index(es):
    • Date
    • Thread