• 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: Ken Thomases <email@hidden>
  • Date: Tue, 27 Oct 2015 20:24:59 -0500

On Oct 27, 2015, at 2:58 PM, Jens Alfke <email@hidden> wrote:

> On Oct 27, 2015, at 12:13 PM, Dave <email@hidden> wrote:
>>
>> I know I’ve seen a property that controls if a Window’s storage is released etc and the window properly closed or if it just “hides” but I can’t seem to find it? I’ve looked in NSWindowController and NSWindow but I just can’t see it anywhere.
>
>
> NSWindow.h, line 373:
>
> @property (getter=isReleasedWhenClosed) BOOL releasedWhenClosed;

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

I suspect he's thinking of oneShot or maybe backingType, but this is misguided, too.


On Oct 27, 2015, at 2:13 PM, Dave <email@hidden> wrote:

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

Regards,
Ken


_______________________________________________

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: How to completely destroy/close a Window
      • From: Dave <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>)

  • Prev by Date: Re: NSFileWrapper - is this really so bad?
  • Next by Date: Re: NSFileWrapper - is this really so bad?
  • Previous by thread: Re: How to completely destroy/close a Window
  • Next by thread: Re: How to completely destroy/close a Window
  • Index(es):
    • Date
    • Thread