• 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
[HELP] beginCriticalAlertSheet NSSelector implementation in Cocoa (Java/ObjC)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HELP] beginCriticalAlertSheet NSSelector implementation in Cocoa (Java/ObjC)?


  • Subject: [HELP] beginCriticalAlertSheet NSSelector implementation in Cocoa (Java/ObjC)?
  • From: "Mark Orchard" <email@hidden>
  • Date: Fri, 3 Aug 2001 19:33:58 +1000

Hi everybody,

The documentation for alert sheets in class NSAlertPanel are all marked as
"Description forthcoming" in AppKit.pdf

I manage to display the sheet in Java with no problem, except for not
knowing how the NSSelectors are implemented.

Arguments to NSAlertPanel.beginCriticalAlertSheet are:

public static void beginCriticalAlertSheet(
String aString1, // Major text
String aString2, // Default button text e.g. "OK"
String aString3, // Alternate button 1 e.g. "Cancel"
String aString4, // Alternate button 2 e.g. "Whatever"
NSWindow aWindow, // Parent window
Object anObject1, // What's this object for?
NSSelector aSelector1, // Result selector
NSSelector aSelector2, // Why two?
Object anObject2, // contextInfo?
String aString5) // Minor text

I tried (example),

NSAlertPanel.beginCriticalAlertSheet("Are you sure you wish to delete your
entire income?", "Cancel", "Delete", null, mainWindow, null, new
NSSelector("delIncomePanelDidEnd", new Class[] {NSAlertPanel.class,
int.class, Object.class}), null, null, "(Your bank manager may get an
ulcer)");

but I get an "unrecognized selector" error.

-new Class[] {NSAlertPanel.class, int.class, Object.class})- was a guess,
but it worked for NSOpenPanel. I thought this method call would be similar.

Can anyone please fill in the missing information for the NSSelector
implementation?


Any help would be appreciated.

Thanks,


Mark


  • Follow-Ups:
    • Re: [HELP] beginCriticalAlertSheet NSSelector implementation in Cocoa (Java/ObjC)?
      • From: François Frisch <email@hidden>
    • Re: [HELP] beginCriticalAlertSheet NSSelector implementation in Cocoa (Java/ObjC)?
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: What is the best to load a picture....
  • Next by Date: Re: [HELP] beginCriticalAlertSheet NSSelector implementation in Cocoa (Java/ObjC)?
  • Previous by thread: What is the best to load a picture....
  • Next by thread: Re: [HELP] beginCriticalAlertSheet NSSelector implementation in Cocoa (Java/ObjC)?
  • Index(es):
    • Date
    • Thread