• 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: How to completely destroy/close a Window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to completely destroy/close a Window


  • Subject: Re: How to completely destroy/close a Window
  • From: Dave <email@hidden>
  • Date: Wed, 28 Oct 2015 10:41:18 +0000

Hi Ken,

> No, this isn't relevant.  When a window is controlled by a window controller, releasedWhenClosed has no effect.  See the docs.

Ahhh, thanks.

>> I have a NSWindowController and NSWindow Pair and I just want them both disposed of and re-created next time.
>
>
> Dave, if you want to fully release a window and window controller, just clear/release all strong references you have to them.  If you feel like it, you can call -close on the window controller first or something like that, but it's not necessary.
>
> Then, to create a new pair just, um, create a new pair.  Instantiate a new window controller and have it load its window NIB when its window is requested, etc.
>
> In other words, what exactly is the mystery here?

Great, thanks a lot, I’m doing that anyway so was over thinking it, I thought for some reason that I needed to set the “releasedWhenClosed” property to YES or it would just hide the window, it came from a half remembered discussion on here a while back, but I was on a train at the time and couldn’t get to the docs check.

All the Best
Dave


_______________________________________________

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: 
 >How to completely destroy/close a Window (From: Dave <email@hidden>)
 >Re: How to completely destroy/close a Window (From: Jens Alfke <email@hidden>)
 >Re: How to completely destroy/close a Window (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: NSFileWrapper - is this really so bad?
  • Next by Date: mysterious behavior of system font metrics
  • Previous by thread: Re: How to completely destroy/close a Window
  • Next by thread: Dictionary and Range
  • Index(es):
    • Date
    • Thread