Re: multiple documents in an app
Re: multiple documents in an app
- Subject: Re: multiple documents in an app
- From: mmalcolm crawford <email@hidden>
- Date: Thu, 3 Nov 2005 12:53:13 -0800
On Nov 3, 2005, at 12:03 PM, Boyd Collier wrote:
I presume that what I have to do is create another nib file with a
window of the sort that I want for showing the output, and I know
how to do this. But what I'm not clear on is how to add this to
the array of documents maintained by NSDocumentController. Do I
put a controller of some sort into this new nib? If so, should it
be a subclass of NSDocument or of NSWindow or of NSObject?
See <http://developer.apple.com/documentation/Cocoa/Conceptual/
Documents/Concepts/OverviewDocArchitecture.html>
<http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/
Concepts/RolesOfDocObjects.html>
and
<http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/
Tasks/FAQ.html#//apple_ref/doc/uid/20000954-1081912>
In brief:
Create a new subclass of NSDocument and nib file.
Set an instance of the subclass of NSDocument as the File's Owner of
the nib.
Implement - (NSString *)windowNibName to return the name of the new nib.
Update your properties list as appropriate (see reference above).
Implement a subclass of NSDocumentController to handle different
document types (or, if you already have an app controller or
delegate, implement suitable methods in that).
mmalc
_______________________________________________
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