• 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: Completely remove a window (from NSApp)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Completely remove a window (from NSApp)?


  • Subject: Re: Completely remove a window (from NSApp)?
  • From: PGM <email@hidden>
  • Date: Wed, 27 Dec 2006 18:41:27 -0500

[myWindow close] should usually do the job (not to be confounded with NSDocument's close method), this also causes the window instance to be release if setReleasedWhenClosed: is set to YES.

Cheers, Patrick


On 27-Dec-06, at 17:56 PM, Jerry Krinock wrote:

I understand that NSApp maintains the "master list" of references to all the
app's windows, which it returns a copy of in response to -[NSApp windows].
So, it seems like NSApp should have a -removeWindow: method in order to
remove them, but it does not.


So, how do I completely remove a window?

Thanks!

Jerry Krinock


Why I'm asking this: This app is sort-of document-based. My documents are
subclasses of NSDocument, but I've over-ridden a lot of stuff to get special
behavior, and presently I need to remove a window as part of "Don't Save".


By the way, I can't find any documentation on how a window gets added to
that "master list" in NSApp either. It seems to be by magic!



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40sympatico.ca


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Completely remove a window (from NSApp)? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Basic NSFont and string drawing question
  • Next by Date: Re: Preferences binding update NSTextField and user defaults
  • Previous by thread: Completely remove a window (from NSApp)?
  • Next by thread: Re: Completely remove a window (from NSApp)?
  • Index(es):
    • Date
    • Thread