• 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: Close a alert sheet programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Close a alert sheet programatically


  • Subject: Re: Close a alert sheet programatically
  • From: Thomas Davie <email@hidden>
  • Date: Thu, 6 Jan 2005 19:35:01 +0000

Possibly a slightly better approach though (and one that isn't deprecated) is to use the NSAlert class and use NSApp to close it.

Bob

--
God is real... Unless you define it as an integer.
On 6 Jan 2005, at 11:54, Denis Defreyne wrote:

On 06 Jan 2005, at 12:47, Peter Karlsson wrote:

I have tried this:

[NSApp endSheet:[self window] returnCode: NSAlertDefaultReturn];

But I get a error when building saying:

MyController may not respond to -window

What is the problem here?

Whoops. You should probably not use [self window]. Call -endSheet:returnCode: with the sheet window. To get a window's attached sheet, you use [myWindow attachedSheet] (replace myWindow with the window the sheet is attached to).


Sorry for the confusion.

Regards,

amon-re

--
mail: email@hidden
web: http://www.amonre.org/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Close a alert sheet programatically
      • From: Denis Defreyne <email@hidden>
References: 
 >Re: Close a alert sheet programatically (From: Denis Defreyne <email@hidden>)

  • Prev by Date: Re: stringWithContentsOfURL bug?
  • Next by Date: Default Button heartBeat bug
  • Previous by thread: Re: Close a alert sheet programatically
  • Next by thread: Re: Close a alert sheet programatically
  • Index(es):
    • Date
    • Thread