• 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: Keeping closed windows in the Window menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping closed windows in the Window menu


  • Subject: Re: Keeping closed windows in the Window menu
  • From: Andreas Eriksson <email@hidden>
  • Date: Mon, 18 Jan 2010 22:24:29 +0100

On Mon, Jan 18, 2010 at 10:04 PM, Quincey Morris
<email@hidden> wrote:
> On Jan 18, 2010, at 11:23, Andreas Eriksson wrote:
>
>> What's the recommended way of keeping a window in the Window menu
>> (like e.g. Address book and iChat does) so that it can be brought back
>> even after it has been closed?
>
> Here's the code (in the window controller) I use to do this:
>
> - (void) orderOutMyWindow: (id) sender {
>        NSString* title = self.window.title;
>        [self.window orderOut: sender];
>        [NSApp addWindowsItem: self.window title: title filename: NO];
> }
>
> - (BOOL) windowShouldClose: (id) sender {
>        [self performSelector: @selector (orderOutMyWindow:) withObject: sender afterDelay: 0.0];
>        return NO;
> }
Thanks! Why is it necessary to delay the orderOutMyWindow invocation
with performSelector?
_______________________________________________

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: 
 >Keeping closed windows in the Window menu (From: Andreas Eriksson <email@hidden>)
 >Re: Keeping closed windows in the Window menu (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Use NSDocument as a variable of another NSDocument
  • Next by Date: Re: Keeping closed windows in the Window menu
  • Previous by thread: Re: Keeping closed windows in the Window menu
  • Next by thread: Re: Keeping closed windows in the Window menu
  • Index(es):
    • Date
    • Thread