Why is [[NSDocumentController sharedDocumentController] currentDocument] returning null?
Why is [[NSDocumentController sharedDocumentController] currentDocument] returning null?
- Subject: Why is [[NSDocumentController sharedDocumentController] currentDocument] returning null?
- From: Rick Hoge <email@hidden>
- Date: Tue, 20 Jul 2004 11:00:41 -0400
I'm trying to track the current document in a doc-based app using Cocoa
bindings. When I see the notification 'windowDidBecomeMain' I send
will/didChangeValueForKey messages to force UI updates. The UI
elements in question are bound to an accessor method that returns the
value obtained from [[NSDocumentController sharedDocumentController]
currentDocument].
In general this works when I select one document among others by
clicking on its window. If, however, I cover the document windows with
another app and then raise them by clicking on the dock icon, I get a
null return value for currentDocument. This seems weird, since the
operation definitely culminates in one of the documents being current.
Anyone know why this might be happening?
Also does anyone know where I might find a complete list of all the
'standard' notifications issues in Cocoa apps? I've had a hard time
locating such a beast.
thanks,
Rick
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.