(newbie): how to create a 2nd document type
(newbie): how to create a 2nd document type
- Subject: (newbie): how to create a 2nd document type
- From: Mark Dawson <email@hidden>
- Date: Wed, 26 Jan 2005 18:43:21 -0800
I'm unclear about the process of creating a new document type. For
simplicity, let's say I'm just making a subclass of an existing
document type ("SubClassDocument"). What I'm not clear on is how my
new document type gets invoked. What I know is what I've done is
missing a step (or two), as the super class's document is being
created, NOT my new document.
(1) IB: Menu:
(a) I've added "New SubClass" (cmd-shift-N) to the File menu
(b) associated it with the first responder
(c) connected it to the "newDocument" action
(2) Code:
(a) Created a new class, sub class of an existing document.
(b) Added -init, - (void)makeWindowControllers;
- (NSData *)dataRepresentationOfType:(NSString *)type;
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)type;
(all of which simply call [super xxxx])
(3) XCode:
(a) In the Document types area, I added my new document type (beneath
the old one)
(b) Added in the name of my new document subclass.
_______________________________________________
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