Sharing a view between NSWindow instances
Sharing a view between NSWindow instances
- Subject: Sharing a view between NSWindow instances
- From: "ad veloper" <email@hidden>
- Date: Mon, 17 Sep 2007 09:38:23 +0100
Rather than allocating a unique instance of a particular view to a
window, I'd like to swap one in and out from an existing NSWindow's
view heirarchy.
This is in an effort to make a fullScreenToggle, where one of the
app's "normal window" views becomes the contentView of the "fullscreen
window".
I'm doing this at the moment (Note: fragment)
[FullScreenWindow setContentView:[[[[SCIView alloc] init] retain] autorelease]];
// instead of the more desireable
[FullScreenWindow setContentView:sharedView];
My guess is that the desireable version releases (smash and grabs) the
sharedView from the "normal windows" view heirarchy, and so works for
entering fullscreen, but restoring the normal view results in a
missing sharedView in the restored view.
Presumably I need to implement some method of shifting the sharedView
from one window's view hierarchy to the other. If so, what should I do
about maintaining relative position and size?
Thanks.
P.S
This is elaborates the problem stated here:
http://www.cocoabuilder.com/archive/message/cocoa/2007/9/14/189230
_______________________________________________
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