• 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
NSDocument Object Changing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Toll-free bridge type at runtime
  • Next by Date: Re: NSPopUpButton pullsDown:YES and dummy first item - normal?
  • Previous by thread: Problem with NSOutlineView
  • Next by thread: NSData encode decode
  • Index(es):
    • Date
    • Thread