Re: CoreData/NSPersistentDocument initialization
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