On Oct 25, 2012, at 3:24 PM, Kyle Sluder wrote:

> On Thu, Oct 25, 2012, at 09:42 AM, Seth Willits wrote:
>> 
>> But, if you just use the -object in the notification to
>> windowDidBecomeMain: you're fine. So if you keep a reference to that
>> window/document yourself and return it from your own currentDocument
>> that'd work. You also need to watch windowWillResignMain:
>> windowWillClose: and optionally(?) applicationDidBecomeActive:  (And
>> actually, this is how Omni has been doing it for yeeeears.)
> 
> NSWindow has a -document accessor, so you don't need to override
> -currentDocument.
> 
> But yes, the gist of how OmniInspector works is that we listen for
> window did become/resign main notifications and prompt our inspectors to
> update themselves by traversing the responder chain of the main window.


I was not suggesting to override -[NSDocumentController currentDocument].  He 
has -[AppDelegate currentDocument].


--
Seth Willits




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to