[HELP] beginCriticalAlertSheet NSSelector implementation in Cocoa (Java/ObjC)?
[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