• 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
Re: Document Based Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document Based Application


  • Subject: Re: Document Based Application
  • From: Graham Cox <email@hidden>
  • Date: Sun, 08 Jul 2012 11:07:55 +1000

On 08/07/2012, at 8:41 AM, koko wrote:

> My Document Based Application is to have n document types.
>
> Is it then proper to create n subclasses of NSDocument and the corresponding plist Document types entries, i.e. Item 0 thru Item n-1 ?



You can do it that way, or you can let a NSDocument subclass handle multiple types if they are quite similar, or a bit of both. i.e. it depends. In my app I have one document subclass for a number of filetypes, because they all end up as the same document type with the same internal data model.

> Is it true that all n document types will have a common extension but will be identified by the Document types entires?


If they all have the same extension then the system can't distinguish when a file is opened by your app what document object class it should instantiate, so that won't work.

--Graham


_______________________________________________

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

  • Follow-Ups:
    • Re: Document Based Application
      • From: koko <email@hidden>
References: 
 >Document Based Application (From: koko <email@hidden>)

  • Prev by Date: Re: Problem adding subview to NSScroller subclass
  • Next by Date: Re: Problem adding subview to NSScroller subclass
  • Previous by thread: Document Based Application
  • Next by thread: Re: Document Based Application
  • Index(es):
    • Date
    • Thread