• 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: window controller question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window controller question


  • Subject: Re: window controller question
  • From: Rainer Standke <email@hidden>
  • Date: Mon, 28 Jun 2010 17:54:40 -0700

Thanks, Jens.

I have a follow-up question: When I close and re-open the window, the window is 'empty', no content is shown. It turns out that the Window Controller is removed from the document's windowControllers. Since I hung onto it in an iVar on the document I add it back to the doc's windowControllers and then call showWindow: - is that the way to do it?

Thanks,

Rainer


On Jun 28, 2010, at 14:20 , Jens Alfke wrote:

>
> On Jun 28, 2010, at 12:40 PM, Rainer Standke wrote:
>
>> - when new document opens I put its window controller into an iVar so that I can use it as a reference when the user selects a menu to open the main window.
>> - then I instantiate one new window controller for each additional window, and put each of those into an iVar to be used in a method that opens the corresponding window, like an IBAction hooked up to menu item.
>
> Sounds reasonable, assuming you’ve got a fixed set of windows that can be opened for a document. (If you could open an arbitrary number, you’d need an NSArray or something.)
>
> —Jens

_______________________________________________

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: 
 >window controller question (From: Rainer Standke <email@hidden>)
 >Re: window controller question (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Unstuffing my build
  • Next by Date: Re: Unstuffing my build
  • Previous by thread: Re: window controller question
  • Next by thread: Re: window controller question
  • Index(es):
    • Date
    • Thread