• 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: NSWindowController to manage two NSWindow instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindowController to manage two NSWindow instances


  • Subject: Re: NSWindowController to manage two NSWindow instances
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 3 Aug 2007 15:24:15 -0700

On Aug 2, 2007, at 1:44 AM, Mirko Viviani wrote:

I want to use a single NSWindowController to manage two different instances of NSWindow, one at a time.
To do that I use the NSWindowController -setWindow: method to swap instances but after doing that the NSWindow
delegate methods are not anymore called.
The first time they are called but not after swapping.

Why do you want to do that, rather than have separate NSWindowController instances, one for each window?


Cocoa assumes quite strongly that the relationship between NSWindowController and NSWindow is one-to-one, in both directions. If you try to use one NSWindowController instance to manage multiple NSWindow instances, or if you try to use multiple NSWindowController instances to manage one NSWindow instance, you'll end up fighting the framework a lot and writing lots of relatively fragile code.

  -- Chris

--
keep replies to the list, please


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSWindowController to manage two NSWindow instances
      • From: Mirko Viviani <email@hidden>
References: 
 >NSWindowController to manage two NSWindow instances (From: Mirko Viviani <email@hidden>)

  • Prev by Date: Re: [OT] "Fluent Interface"? Welcome to NeXT
  • Next by Date: [moderator again] Re: [OT] "Fluent Interface"? Welcome to NeXT
  • Previous by thread: NSURLConnection and multipart/x-mixed streams
  • Next by thread: Re: NSWindowController to manage two NSWindow instances
  • Index(es):
    • Date
    • Thread