• 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: Gordon Apple <email@hidden>
  • Date: Tue, 25 Nov 2008 12:24:46 -0600
  • Thread-topic: Best way to Change Window

    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 (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

References: 
 >Re: Best way to Change Window (From: Iceberg-Dev <email@hidden>)

  • Prev by Date: Re: NSComboBox list is incorrect size on first dropdown
  • Next by Date: Supporting Tiger, using leopard functions when possible?
  • Previous by thread: Re: Best way to Change Window
  • Next by thread: NSXMLElement -stringValue and whitepsace
  • Index(es):
    • Date
    • Thread