NSDocument Object Changing
NSDocument Object Changing
- Subject: NSDocument Object Changing
- From: K.Darcy Otto <email@hidden>
- Date: Thu, 2 Apr 2009 15:18:19 -0700
I am writing a document-based application, and seem to be having a
problem with my NSDocument object (using the standard MyDocument.h/m)
changing. In particular, I have a toolbar button that brings up a
previously populated NSWindowController and shows a window and a
panel). The problem appears in three stages:
(1) When MyDocument is initialised, NSLog(@"%@",self); returns x.
(2) When the toolbar button is clicked, the appropriate panel comes
up, and NSLog(@"%@",self); returns x.
(3) When the toolbar button is clicked a second time,
NSLog(@"%@",self); returns y (where x is not the same address as y).
Now as far as I can tell, there is no alloc/init (this only happens in
the designated initialiser) or copy of MyDocument (there is an assign
of MyDocument to the NSWindowController object so I can call back to
methods in MyDocument.m). Note that if I click on the toolbar button
a third time, NSLog(@"%@",self); returns y. I can't seem to figure
out how the new MyDocument object is being created. Any help would be
appreciated.
_______________________________________________
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