Re: multiple windowcontrollers
Re: multiple windowcontrollers
- Subject: Re: multiple windowcontrollers
- From: Koen van der Drift <email@hidden>
- Date: Thu, 24 Jun 2004 05:16:06 -0400
On Jun 24, 2004, at 3:23 AM, Louis C. Sacha wrote:
Hello...
It sounds like you really don't want to have each document use more
than one window controller...
Since you seem to want one info window per application as opposed to
one per document, the info window controller (and the search window
controller if/when you implement it) should really belong to the main
application controller.
Actually, the infowindow should be one per document, so I can compare
them on the screen. I thought about a sheet, but then the main window
becomes uneditable. Was my initial suggestion correct in that case to
use more than one windowcontroller?
In regard to making sure that the info window always displays
information about the current (frontmost) document when there are
multiple documents open, NSDocumentController provides the
currentDocument method which will return the NSDocument instance
associated with the main window.
You could register as an observer for the
NSWindowDidBecomeMainNotification sent out when the main window
changes, and refresh your info window if the document has changed.
Thanks, those are very useful tips.
- Koen.
_______________________________________________
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.