• 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-window document best practices?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multi-window document best practices?


  • Subject: Re: multi-window document best practices?
  • From: Willeke <email@hidden>
  • Date: Mon, 14 May 2012 00:07:46 +0200

Op 13 mei 2012, om 04:11 heeft email@hidden het volgende geschreven:

> If it were important that nibs should be built differently for single and multiple window cases, I'd think the docs would mention it someplace, but they don't

They do.

The documentation of awakeFromNib says
It is recommended that you maintain a one-to-one correspondence between your File’s Owner objects and their associated nib files.

You Should Subclass NSWindowController in Document-Based App Programming Guide for Mac says
Reasons to Subclass NSWindowController: If your document requires or allows multiple windows for a single document, that is a good reason to subclass NSWindowController.
How to Subclass NSWindowController: The NSWindowController subclass instance should be the File’s Owner for the nib file because that creates better separation between the view-related logic and the model-related logic.


If each NIB has its own owner, awakeFromNib is only called once.


Willeke
_______________________________________________

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: multi-window document best practices?
      • From: "email@hidden" <email@hidden>
References: 
 >multi-window document best practices? (From: "email@hidden" <email@hidden>)
 >Re: multi-window document best practices? (From: Kyle Sluder <email@hidden>)
 >Re: multi-window document best practices? (From: "email@hidden" <email@hidden>)
 >Re: multi-window document best practices? (From: Kyle Sluder <email@hidden>)
 >Re: multi-window document best practices? (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: mutableBytes Creates Autoreleased Objects
  • Next by Date: +stringWithContentsOfURL read-only?
  • Previous by thread: Re: multi-window document best practices?
  • Next by thread: Re: multi-window document best practices?
  • Index(es):
    • Date
    • Thread