• 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: NSDocument - when is it a new document?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument - when is it a new document?


  • Subject: Re: NSDocument - when is it a new document?
  • From: Mark Piccirelli <email@hidden>
  • Date: Fri, 5 Oct 2001 13:59:18 -0700

I think it's more typical to do model-related initialization of documents in an override of the -init method. See Sketch for example. SKTDrawDocument doesn't even have an override of -windowControllerDidLoadNib:. Remember to have your subclass' -init method invokes [super init]. Forgetting to do so is a common mistake.

Maybe we'll update that template to make this clearer...

-- Mark

On Tuesday, October 2, 2001, at 04:38 AM, Markus Hitter wrote:

Am Dienstag, 2. Oktober 2001 um 12:31 schrieb Ryan Dary:

I am looking at the NSDocument class. I see the methods used to load and
save data, but how does the class get notified when it is a "new
document" and should setup some defaults?

Put the stuff into -windowControllerDidLoadNib which one of the methods provided by the template.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Re: NSDocument - when is it a new document? (From: Markus Hitter <email@hidden>)

  • Prev by Date: Re: Subclassing NSToolBar.
  • Next by Date: Re: Subclassing NSToolBar.
  • Previous by thread: Re: NSDocument - when is it a new document?
  • Next by thread: NSString constant for ascii 13
  • Index(es):
    • Date
    • Thread