// The default alert style is NSAlertWarningStyle. NSAlertCriticalStyle should be reserved for critical alerts and will cause the icon to be badged with a caution icon.
/*GivenanNSError,createanNSAlertthatcanbeusedtopresenttheerrortotheuser.Theerror's localized description, recovery suggestion, and recovery options will be used to set the alert'smessagetext,informativetext,andbuttontitles,respectively.
*/
+(NSAlert*)alertWithError:(NSError*)error;
#endif
// the following class method is for use by apps migrating from the C-based API. Note that this returns an NSAlert that is equivalent to the one created in NSRunAlertPanel, so the layout, button return values, and key equivalents are the same as for the C-based API.
// customize the icon. By default uses the image named NSApplicationIcon
-(void)setIcon:(NSImage*)icon;
-(NSImage*)icon;
// customize the buttons in the alert panel
// buttons are added from right to left (for left to right languages)
-(NSButton*)addButtonWithTitle:(NSString*)title;
// get the buttons, where the rightmost button is at index 0
-(NSArray*)buttons;
// The following method can be used to customize return values for buttons
// setTag:(int)tag; setting a tag on a button will cause that tag to be the button's return value
// Note that we reserve the use of the tag for this purpose. We also reserve the use of the target and the action
// by default, the first button has a key equivalent of return which implies a pulsing default button, the button named "Cancel", if any, has a key equivalent of escape, and the button named "Don't Save", if any, has a key equivalent of cmd-d. The following methods can be used to customize key equivalents.
// -setShowsHelp:YES adds a help button to the alert panel. When the help button is pressed, the delegate is first consulted. If the delegate does not implement alertShowHelp: or returns NO, then -[NSHelpManager openHelpAnchor:inBook:] is called with a nil book and the anchor specified by -setHelpAnchor:, if any. An exception will be raised if the delegate returns NO and there is no help anchor set.
-(void)setShowsHelp:(BOOL)showsHelp;
-(BOOL)showsHelp;
-(void)setHelpAnchor:(NSString*)anchor;
-(NSString*)helpAnchor;
-(void)setAlertStyle:(NSAlertStyle)style;
-(NSAlertStyle)alertStyle;
-(void)setDelegate:(id)delegate;
-(id)delegate;
// Run the alert as an application-modal panel and return the result
-(int)runModal;
// Run the alert as a sheet. didEndSelector will be invoked after the return value is known but before the sheet is dismissed. Callers that want to dismiss the sheet themselves before carrying out an action in response to the return value should do so by calling orderOut: on [alert window]. The didEndSelector should have the following signature: