• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
(newbie): how to create a 2nd document type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(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


  • Follow-Ups:
    • RE: (newbie): how to create a 2nd document type
      • From: "Jonathan E. Jackel" <email@hidden>
    • Re: (newbie): how to create a 2nd document type
      • From: Charlton Wilbur <email@hidden>
  • Prev by Date: Re: Problems with custom NSView subclass, IBPalette, and bindings support
  • Next by Date: Re: (newbie): how to create a 2nd document type
  • Previous by thread: Re: Observing change of selection
  • Next by thread: Re: (newbie): how to create a 2nd document type
  • Index(es):
    • Date
    • Thread