Re: NSDocument - when is it a new document?
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