Re: How to completely destroy/close a Window
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