• 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: NSPersistentDocument and initWithType:Error (solved)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPersistentDocument and initWithType:Error (solved)


  • Subject: Re: NSPersistentDocument and initWithType:Error (solved)
  • From: Peter Ferrett <email@hidden>
  • Date: Sat, 7 Mar 2009 17:34:16 +0000


After stripping the code down, It seems to be working now. The original errant code remains a mystery.


On 7 Mar 2009, at 15:14, Peter Ferrett wrote:


The NSDocument reference manual states: 'If you need to perform initializations that must be done when creating new documents but should not be done when opening existing documents, override initWithType:error:.'


In my NSPersistentDocument subclass, I have overridden the initWithType:error: method as specified. However, the initializer does indeeed get called when opening existing xml documents. I have no other init: methods subclass and no NSDocumentController methods subclassed.

Have I missed out on something obvious or is this not applicable to NSPersistenDocument?

PeterF



_______________________________________________

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

_______________________________________________

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


References: 
 >NSPersistentDocument and initWithType:Error (From: Peter Ferrett <email@hidden>)

  • Prev by Date: Re: Moving a window offscreen
  • Next by Date: Re: CrashReporter alternatives for third-party apps?
  • Previous by thread: NSPersistentDocument and initWithType:Error
  • Next by thread: preparing HTML email content for Mail.app like safari does
  • Index(es):
    • Date
    • Thread