![]() |
API
0.9.6
|
#import <CPAlert.h>
Inheritance diagram for CPAlert:Class Methods | |
| (CPAlert) | + alertWithError: |
| (CPAlert) | + alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat: |
Class Methods inherited from CPObject | |
| (BOOL) | + accessInstanceVariablesDirectly |
| (id) | + alloc |
| (id) | + allocWithCoder: |
| (BOOL) | + automaticallyNotifiesObserversForKey: |
| (Class) | + class |
| (void) | + exposeBinding: |
| (void) | + initialize |
| (IMP) | + instanceMethodForSelector: |
| (BOOL) | + instancesRespondToSelector: |
| (BOOL) | + isSubclassOfClass: |
| (CPSet) | + keyPathsForValuesAffectingValueForKey: |
| (void) | + load |
| (id) | + new |
| (void) | + setVersion: |
| (Class) | + superclass |
| (int) | + version |
Additional Inherited Members | |
Instance Variables inherited from CPObject | |
| Class | isa |
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 |
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 |
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 |
set the accessory view
| aView | the accessory view |
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 |
|
implementation |
|
implementation |
Synthesized accessor method.
Provided by category CPAlert(CPSynthesizedAccessors).
|
implementation |
set if 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 |