• 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
Re: multiple windowcontrollers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: multiple windowcontrollers
      • From: "Louis C. Sacha" <email@hidden>
References: 
 >multiple windowcontrollers (From: Koen van der Drift <email@hidden>)
 >Re: multiple windowcontrollers (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: Slightly more advanced Cocoa learning resources
  • Next by Date: Re: Slightly more advanced Cocoa learning resources
  • Previous by thread: Re: multiple windowcontrollers
  • Next by thread: Re: multiple windowcontrollers
  • Index(es):
    • Date
    • Thread