Re: NSDocument
Re: NSDocument
- Subject: Re: NSDocument
- From: David Blanton <email@hidden>
- Date: Thu, 14 Jan 2010 14:21:38 -0700
Only one nib (xib) that was created (MyDocument.xib) when the project
was created form the document based app template.
I am looking at the Open as Files Owner ... hmm not sure.
Thanks.
-db
On Jan 14, 2010, at 1:27 PM, Quincey Morris wrote:
On Jan 14, 2010, at 11:57, David Blanton wrote:
When my document based app starts up the awakeFromNib method in my
NSDocument subclass is called.
When I choose Open a new NSDocument is instanced but this does not
call awakeFromNib.
Am I missing a setting?
I need awakeFromNib to be called for any instance on my NSDocument
sublass.
'[NSDocument awakeFromNib]' is invoked because (or when, if you
prefer) the document is File's Owner for the associated nib file.
Your symptoms would suggest that it's being set as File's Owner when
a File -> New... is done (since that's what you get for free when
the application starts up) but not when a File -> Open... is done.
Is it possible there are two nib files being used in these two
situations?
If you've set the document's window controller as File's Owner, then
*it* will get the 'awakeFromNib' instead of the document.
Also, as usual when an application mysteriously fails to do
something, it's vital to check the log for exception error messages
-- something I typically forget to do.
Does any of that suggest anything helpful?
_______________________________________________
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
_______________________________________________
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