Samond Classes Library 1.2.6-STABLE build 219
List of all members
NSAlert(SCAlert) Category Reference

Additional functionality for the standard class NSAlert. More...

#import <NSAlert+SCAlert.h>

Creating Alerts

(instancetype) + alertWithStyle:message:text:buttons:
 
(instancetype) + criticalAlertWithMessage:text:buttons:
 
(instancetype) + criticalAlertWithMessage:text:button:
 
(instancetype) + criticalAlertWithMessage:text:
 
(instancetype) + warningAlertWithMessage:text:buttons:
 
(instancetype) + warningAlertWithMessage:text:button:
 
(instancetype) + warningAlertWithMessage:text:
 
(instancetype) + alertWithMessage:text:buttons:
 
(instancetype) + alertWithMessage:text:button:
 
(instancetype) + alertWithMessage:text:
 

Initializing Alerts

(instancetype) - initWithStyle:message:text:buttons:
 
(instancetype) - initCriticalAlertWithMessage:text:buttons:
 
(instancetype) - initCriticalAlertWithMessage:text:button:
 
(instancetype) - initCriticalAlertWithMessage:text:
 
(instancetype) - initWarningAlertWithMessage:text:buttons:
 
(instancetype) - initWarningAlertWithMessage:text:button:
 
(instancetype) - initWarningAlertWithMessage:text:
 
(instancetype) - initWithMessage:text:buttons:
 
(instancetype) - initWithMessage:text:button:
 
(instancetype) - initWithMessage:text:
 

Running Alerts

(NSInteger) + runAlertWithStyle:message:text:buttons:
 
(NSInteger) + runCriticalAlertWithMessage:text:buttons:
 
(NSInteger) + runCriticalAlertWithMessage:text:button:
 
(NSInteger) + runCriticalAlertWithMessage:text:
 
(NSInteger) + runWarningAlertWithMessage:text:buttons:
 
(NSInteger) + runWarningAlertWithMessage:text:button:
 
(NSInteger) + runWarningAlertWithMessage:text:
 
(NSInteger) + runAlertWithMessage:text:buttons:
 
(NSInteger) + runAlertWithMessage:text:button:
 
(NSInteger) + runAlertWithMessage:text:
 

Requesting a User Confirmation

(BOOL) + confirmAlertWithStyle:message:text:confirm:buttons:
 
(BOOL) + confirmCriticalAlertWithMessage:text:confirm:buttons:
 
(BOOL) + confirmCriticalAlertWithMessage:text:buttons:
 
(BOOL) + confirmWarningAlertWithMessage:text:confirm:buttons:
 
(BOOL) + confirmWarningAlertWithMessage:text:buttons:
 
(BOOL) + confirmAlertWithMessage:text:confirm:buttons:
 
(BOOL) + confirmAlertWithMessage:text:buttons:
 
(BOOL) + confirmYesNoAlertWithMessage:text:
 
(BOOL) + confirmNoYesAlertWithMessage:text:
 
(BOOL) + confirmOKCancelAlertWithMessage:text:
 
(BOOL) + confirmCancelOKAlertWithMessage:text:
 

Detailed Description

Additional functionality for the standard class NSAlert.

SDK
macOS 10.6+, GNUstep
Since
version 1.2.1

Category extends the functionality of the standard class NSAlert by adding the simple methods for calling the various information panels.

Method Documentation

+ (instancetype) alertWithMessage: (NSString *)  message
text: (NSString *)  text 

Returns an informational alert created by using the specified message and text.

Parameters
message- the message text
text- the informative text
Returns
A created alert
+ (instancetype) alertWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Returns an informational alert created by using the specified message, text and a button title.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A created alert
+ (instancetype) alertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns an informational alert created by using the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A created alert
+ (instancetype) alertWithStyle: (NSAlertStyle)  style
message: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns an alert created by using the specified style, message, text and list of the buttons titles.

Parameters
style- the style of the alert
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A created alert
+ (BOOL) confirmAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a boolean value that determines whether the user response to the informational alert with the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
YES if the user presses the first button, otherwise NO
+ (BOOL) confirmAlertWithMessage: (NSString *)  message
text: (NSString *)  text
confirm: (NSInteger)  confirm
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a boolean value that determines whether the user response to the informational alert with the specified message, text, code of the confirmation button and list of the buttons titles.

Parameters
message- the message text
text- the informative text
confirm- the code of the confirmation button
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
YES if the user presses the confirmation button, otherwise NO
+ (BOOL) confirmAlertWithStyle: (NSAlertStyle)  style
message: (NSString *)  message
text: (NSString *)  text
confirm: (NSInteger)  confirm
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a boolean value that determines whether the user response to the alert with the specified style, message, text, code of the confirmation button and list of the buttons titles.

Parameters
style- the alert style
message- the message text
text- the informative text
confirm- the code of the confirmation button
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
YES if the user presses the confirmation button, otherwise NO
+ (BOOL) confirmCancelOKAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Returns a boolean value that determines whether the user confirms the request by pressing the "OK" button on the alert with the specified message, text and buttons with the titles "Cancel" and "OK".

Parameters
message- the message text
text- the informative text
Returns
YES if the user presses the "OK" button, otherwise NO
+ (BOOL) confirmCriticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a boolean value that determines whether the user response to the critical alert with the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
YES if the user presses the first button, otherwise NO
+ (BOOL) confirmCriticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text
confirm: (NSInteger)  confirm
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a boolean value that determines whether the user response to the critical alert with the specified message, text, code of the confirmation button and list of the buttons titles.

Parameters
message- the message text
text- the informative text
confirm- the code of the confirmation button
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
YES if the user presses the confirmation button, otherwise NO
+ (BOOL) confirmNoYesAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Returns a boolean value that determines whether the user confirms the request by pressing the "Yes" button on the alert with the specified message, text and buttons with the titles "No" and "Yes".

Parameters
message- the message text
text- the informative text
Returns
YES if the user presses the "Yes" button, otherwise NO
+ (BOOL) confirmOKCancelAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Returns a boolean value that determines whether the user confirms the request by pressing the "OK" button on the alert with the specified message, text and buttons with the titles "OK" and "Cancel".

Parameters
message- the message text
text- the informative text
Returns
YES if the user presses the "OK" button, otherwise NO
+ (BOOL) confirmWarningAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a boolean value that determines whether the user response to the warning alert with the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
YES if the user presses the first button, otherwise NO
+ (BOOL) confirmWarningAlertWithMessage: (NSString *)  message
text: (NSString *)  text
confirm: (NSInteger)  confirm
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a boolean value that determines whether the user response to the warning alert with the specified message, text, code of the confirmation button and list of the buttons titles.

Parameters
message- the message text
text- the informative text
confirm- the code of the confirmation button
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
YES if the user presses the confirmation button, otherwise NO
+ (BOOL) confirmYesNoAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Returns a boolean value that determines whether the user confirms the request by pressing the "Yes" button on the alert with the specified message, text and buttons with the titles "Yes" and "No".

Parameters
message- the message text
text- the informative text
Returns
YES if the user presses the "Yes" button, otherwise NO
+ (instancetype) criticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Returns a critical alert created by using the specified message and text.

Parameters
message- the message text
text- the informative text
Returns
A created alert
+ (instancetype) criticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Returns a critical alert created by using the specified message, text and a button title.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A created alert
+ (instancetype) criticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a critical alert created by using the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A created alert
- (instancetype) initCriticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Initializes a critical alert using the specified message and text.

Parameters
message- the message text
text- the informative text
Returns
A newly initialized alert
- (instancetype) initCriticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Initializes a critical alert using the specified message, text and a button title.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A newly initialized alert
- (instancetype) initCriticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Initializes a critical alert using the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A newly initialized alert
- (instancetype) initWarningAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Initializes a warning alert using the specified message and text.

Parameters
message- the message text
text- the informative text
Returns
A newly initialized alert
- (instancetype) initWarningAlertWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Initializes a warning alert using the specified message, text and the button title.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A newly initialized alert
- (instancetype) initWarningAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Initializes a warning alert using the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A newly initialized alert
- (instancetype) initWithMessage: (NSString *)  message
text: (NSString *)  text 

Initializes an information alert using the specified message and text.

Parameters
message- the message text
text- the informative text
Returns
A newly initialized alert
- (instancetype) initWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Initializes an information alert using the specified message, text and the button title.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A newly initialized alert
- (instancetype) initWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Initializes an information alert using the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A newly initialized alert
- (instancetype) initWithStyle: (NSAlertStyle)  style
message: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Initializes an alert using the specified style, message, text and list of the buttons titles.

Parameters
style- the style of the alert
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A newly initialized alert
+ (NSInteger) runAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Displays an infrmational alert with the specified message, text and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
Returns
A code of the pressed button
+ (NSInteger) runAlertWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Displays an infrmational alert with the specified message, text, button title and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A code of the pressed button
+ (NSInteger) runAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Displays an infrmational alert with the specified message, text, list of the buttons titles and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A code of the pressed button
+ (NSInteger) runAlertWithStyle: (NSAlertStyle)  style
message: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Displays an alert with the specified style, message, text, list of the buttons titles and returs the code of the pressed by user button.

Parameters
style- the style of the alert
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A code of the pressed button
+ (NSInteger) runCriticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Displays a critical alert with the specified message, text and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
Returns
A code of the pressed button
+ (NSInteger) runCriticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Displays a critical alert with the specified message, text, button title and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A code of the pressed button
+ (NSInteger) runCriticalAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Displays a critical alert with the specified message, text, list of the buttons titles and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A code of the pressed button
+ (NSInteger) runWarningAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Displays a warning alert with the specified message, text and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
Returns
A code of the pressed button
+ (NSInteger) runWarningAlertWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Displays a warning alert with the specified message, text, button title and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A code of the pressed button
+ (NSInteger) runWarningAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Displays a warning alert with the specified message, text, list of the buttons titles and returs the code of the pressed by user button.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A code of the pressed button
+ (instancetype) warningAlertWithMessage: (NSString *)  message
text: (NSString *)  text 

Returns a warning alert created by using the specified message and text.

Parameters
message- the message text
text- the informative text
Returns
A created alert
+ (instancetype) warningAlertWithMessage: (NSString *)  message
text: (NSString *)  text
button: (NSString *)  button 

Returns a warning alert created by using the specified message, text and a button title.

Parameters
message- the message text
text- the informative text
button- the button title
Returns
A created alert
+ (instancetype) warningAlertWithMessage: (NSString *)  message
text: (NSString *)  text
buttons: (NSString *)  button
,   NS_REQUIRES_NIL_TERMINATION 

Returns a warning alert created by using the specified message, text and list of the buttons titles.

Parameters
message- the message text
text- the informative text
button- the first button title to add into the alert
...- a comma-separated list of additional buttons titles, ending with nil pointer
NS_REQUIRES_NIL_TERMINATION- the mandatory nil pointer
Returns
A created alert

The documentation for this category was generated from the following files: