• 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: Best way to Change Window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to Change Window


  • Subject: Re: Best way to Change Window
  • From: Iceberg-Dev <email@hidden>
  • Date: Sun, 23 Nov 2008 23:41:41 +0100


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 (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: Best way to Change Window
      • From: Gordon Apple <email@hidden>
References: 
 >Best way to Change Window (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Automatic file numbering ideas...
  • Next by Date: Re: NSXMLElement -stringValue and whitepsace
  • Previous by thread: Best way to Change Window
  • Next by thread: Re: Best way to Change Window
  • Index(es):
    • Date
    • Thread