Op 13 mei 2012, om 04:11 heeft mlist0...@gmail.com 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to