Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument - when is it a new document?



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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.