• 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: CoreData/NSPersistentDocument initialization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData/NSPersistentDocument initialization


  • Subject: Re: CoreData/NSPersistentDocument initialization
  • From: Jim Correia <email@hidden>
  • Date: Sat, 3 Sep 2005 22:35:08 -0400

On Sep 3, 2005, at 9:33 PM, Paul Forgey wrote:

I am trying to initialize my document data for new documents only. Traditionally, this has been done in the init: method for NSDocument which was called only for new, empty untitled documents. It appears NSPersistentDocument's init method is always called for both new and existing documents. I can't find any way to differentiate the two situations. What am I missing?

Read the header comments or documentation for NSDocument:

- (id)init
- (id)initWithType:(NSString *)typeName error:(NSError **)outError;

For initialization that should only happen for new documents, the work should be done in an override of the latter method.

Jim


_______________________________________________ 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
References: 
 >CoreData/NSPersistentDocument initialization (From: Paul Forgey <email@hidden>)

  • Prev by Date: NSTableView
  • Next by Date: 3rd Party Components
  • Previous by thread: CoreData/NSPersistentDocument initialization
  • Next by thread: Re: CoreData/NSPersistentDocument initialization
  • Index(es):
    • Date
    • Thread