Using Alert Panels(Chapter 15 of Cocoa Programming for Mac OS X)
The NSRunAlertPanel() function returns anint that indicates which button the userclicked. There are global variables for these constants:NSAlertDefaultReturn, NSAlertAlternateReturn, andNSAlertOtherReturn.int NSRunAlertPanel(NSString *title, NSString *msg, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, ...);
页:
[1]