currentDocument returns nil (and it shouldn't)
currentDocument returns nil (and it shouldn't)
- Subject: currentDocument returns nil (and it shouldn't)
- From: Huibert Aalbers <email@hidden>
- Date: Sat, 31 Dec 2005 13:14:21 -0600
Hi,
I am developing a document based application. The class that extends
NSDocument is also a delegate for the document window. I use the
windowDidBecomeMain method to detect when a document is brought to the
front and update the palette windows. The palette window controllers
use [[NSDocumentController sharedDocumentController] currentDocument]
to find out the current document. Everything works fine when I switch
from one document to another. However, when I bring another
application to the front and then switch back to my app, the
windowDidBecomeMain method is invoked but [[NSDocumentController
sharedDocumentController] currentDocument] returns nil. Any ideas as
to what is happening and how I can fix or get around this behaviour?
Regards,
Huibert
--
Viisit my home page at
http://www.huibert-aalbers.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden