Re: stupid newbie questions
Re: stupid newbie questions
- Subject: Re: stupid newbie questions
- From: Scott Ellsworth <email@hidden>
- Date: Fri, 27 May 2005 17:19:09 -0700
On May 27, 2005, at 4:47 PM, Theodore H. Smith wrote:
"File's Owner" is actually the NSDocument, at least for this
project. The fact that the nib name is "MyDocument.nib" might have
some relation to the fact that my class name is "MyDocument".
Other way around. If you look in the generated MyDocument.m, you see
- (NSString *)windowNibName
{
// Override returning the nib file name of the document
// If you need to use a subclass of NSWindowController or if
your document supports multiple NSWindowControllers, you should
remove this method and override -makeWindowControllers instead.
return @"MyDocument";
}
This is what ties the window associated with the document in
MyDocument.m to some nib somewhere. Rename the nib file, and you
must change this function.
Check out the Info.plist, and you will see that the CFBundleTypes
dictionary contains a key-value pair for each document type.
Specifically, the NSDocumentClass key tells the system to fire up an
instance of MyDocument when a document of that type is created.
Do read the docs mmalcolm indicated.
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden