Re: NSWindowController to manage two NSWindow instances
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