#import <CPAlert.h>
Class Methods | |
(CPAlert) | + alertWithError: |
(CPAlert) | + alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat: |
Class Methods inherited from CPObject | |
(BOOL) | + accessInstanceVariablesDirectly |
(id) | + alloc |
(id) | + allocWithCoder: |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(void) | + cancelPreviousPerformRequestsWithTarget: |
(void) | + cancelPreviousPerformRequestsWithTarget:selector:object: |
(Class) | + class |
(BOOL) | + conformsToProtocol: |
(void) | + exposeBinding: |
(void) | + initialize |
(IMP) | + instanceMethodForSelector: |
(BOOL) | + instancesImplementSelector: |
(BOOL) | + instancesRespondToSelector: |
(BOOL) | + isBindingExclusive: |
(BOOL) | + isSubclassOfClass: |
(CPSet) | + keyPathsForValuesAffectingValueForKey: |
(void) | + load |
(id) | + new |
(void) | + object:performSelector:withObject:afterDelay:inModes: |
(void) | + setVersion: |
(Class) | + superclass |
(int) | + version |
CPAlert is an alert panel that can be displayed modally to present the user with a message and one or more options.
It can be used to display an information message CPInformationalAlertStyle
, a warning message CPWarningAlertStyle
(the default), or a critical alert CPCriticalAlertStyle
. In each case the user can be presented with one or more options by adding buttons using the -addButtonWithTitle
: method.
The panel is displayed modally by calling -runModal
and once the user has dismissed the panel, a message will be sent to the panel's delegate (if set), informing it which button was clicked (see delegate methods).
-(void)alertDidEnd:(CPAlert)theAlert returnCode:(int)returnCode; Called when the user dismisses the alert by clicking one of the buttons.
theAlert | the alert panel that the user dismissed |
returnCode | the index of the button that the user clicked (starting from 0, representing the first button added to the alert which appears on the right, 1 representing the next button to the left and so on) |
|
implementation |
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Adds a button with a given title to the receiver. Buttons will be added starting from the right hand side of the CPAlert
panel. The first button will have the index 0, the second button 1 and so on.
The first button will automatically be given a key equivalent of Return, and any button titled "Cancel" will be given a key equivalent of Escape.
You really shouldn't need more than 3 buttons.
title | the title of the button |
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Returns a CPAlert object with the provided info
aMessage | the main body text of the alert |
defaultButton | the title of the default button |
alternateButton | if not nil, the title of a second button |
otherButton | if not nil, the title of the third button |
informativeText | if not nil the informative text of the alert |
|
implementation |
|
implementation |
|
implementation |
Runs the receiver modally as an alert sheet attached to a specified window.
window | The parent window for the sheet. |
modalDelegate | The delegate for the modal-dialog session. |
alertDidEndSelector | Message the alert sends to modalDelegate after the sheet is dismissed. |
contextInfo | Contextual data passed to modalDelegate in didEndSelector message. |
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
|
implementation |
Set the accessory view.
aView | the accessory view |
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
|
implementation |
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Set if the alert shows the suppression button.
shouldShowSuppressionButton | YES or NO |
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
|
implementation |
Sets the title of the alert window. This API is not present in Cocoa.
aTitle | CPString containing the window title |
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
|
implementation |
|
implementation |
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |