I decided to take the easy short-term and use separate Nibs. That may cause more maintenance later, but at least it seems to work. I did have a minor issue that closing the main window first can close the document, depending on whether or not other windows for that document are open. I going to try to rectify that by opening the new window first, then closing the other.
> > On Nov 23, 2008, at 9:44 PM, Gordon Apple wrote: > >> What is the best way to change to a different window? I have a >> main >> window nib with a lot of controllers in it. Currently the main >> view is in a >> scrolling window. I want to live-switch between that and a borderless >> (optionally full screen) window or a resizable (non-scrolling) window. >> >> I'm sure I could do this by duplicating or triplicating the nib, >> changing what is necessary, closing the window, change out the window >> controller in my document, open the new window. However, I don't >> like the >> duplicity of this approach and the need to synchronize future >> changes in >> similar nibs. Is there a better way? >> >> NSWindowController has "setWindow", but it also says: "This method >> releases the old window and any associated top-level objects in its >> nib file >> and assumes ownership of the new window. You should generally >> create a new >> window controller for a new window and release the old window >> controller >> instead of using this method." What are "associated top-level >> objects"? I >> don't want anything else to go away, although I would have to code >> a few >> wiring changes. > > When you needed to change between a brushed metal window and an Aqua > window, a solution was to keep the content view of the current > window, delete the window and create a new one with the appropriate > theme and then replace the content view. > > In your case, it might be interesting to wonder if you want the > control inside the window to look the same as non full-screen. If you > take a look at iPhoto for instance, the look of the controls differs > between fullscreen and standard mode. If you want the controls to > look different, then maybe another nib is a solution. > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]