• 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: NSAlertPanel.beginAlertSheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAlertPanel.beginAlertSheet


  • Subject: Re: NSAlertPanel.beginAlertSheet
  • From: Markus Hitter <email@hidden>
  • Date: Sun, 15 Jul 2001 13:24:27 +0200

Am Sonntag, 15. Juli 2001 um 02:55 schrieb Frangois Frisch:

Hello,

Anyone have any idea how you know which button the user pressed when the
sheet is dismissed?

Here a snippet from the App I'm currently working on.

To open the sheet:
[...]
NSBeginAlertSheet(@"file detected",
@"re-use it", @"discard it", nil, [button window], self,
@selector(afterSheet:returnCode:contextInfo:),
nil, nil,
@"There is a file.");
[...]

Then, the "selected" method:

- (void)afterSheet:(NSWindow *)sheet returnCode:(int)returnCode
contextInfo:(void *)contextInfo {
if (returnCode == NSAlertAlternateReturn) {
[[NSFileManager defaultManager] removeFileAtPath:intImageName handler:nil];
} else {
[...]

I imagine it must be some callback method on the sheet9s delegate. There is
no documentation....

Some notes are in NSPanel.h

Especially for the functions added lately, you find often some notes in the headers. Just do a Textual search for your Function name in all header files to find out.

Have fun,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/


  • Follow-Ups:
    • Bug in NSLog; program to verify included.
      • From: tyler <email@hidden>
    • Re: NSAlertPanel.beginAlertSheet
      • From: Bill Cheeseman <email@hidden>
References: 
 >NSAlertPanel.beginAlertSheet (From: François Frisch <email@hidden>)

  • Prev by Date: Working with Strings
  • Next by Date: Re: NSAlertPanel.beginAlertSheet
  • Previous by thread: NSAlertPanel.beginAlertSheet
  • Next by thread: Re: NSAlertPanel.beginAlertSheet
  • Index(es):
    • Date
    • Thread