A notification that can be posted to a CPNotificationCenter. More...
Public Member Functions | |
(id) | - init [implementation] |
(id) | - initWithName:object:userInfo: [implementation] |
(CPString) | - name [implementation] |
(id) | - object [implementation] |
(CPDictionary) | - userInfo [implementation] |
Static Public Member Functions | |
(CPNotification) | + notificationWithName:object: [implementation] |
(CPNotification) | + notificationWithName:object:userInfo: [implementation] |
A notification that can be posted to a CPNotificationCenter.
Represents a notification for posting to an CPNotificationCenter. Consists of a name, an object, and an optional dictionary. The notification center will check for observers registered to receive either notifications with the name, the object, or both and pass the notification instance on to them.
To create a notification use one of the class methods. The default init method will throw a CPUnsupportedMethodException.
Definition at line 40 of file CPNotification.j.
- (id) init | [implementation] |
CPUnsupportedMethodException | always, because the method should not be used |
Definition at line 73 of file CPNotification.j.
- (id) initWithName: | (CPString) | aNotificationName | ||
object: | (id) | anObject | ||
userInfo: | (CPDictionary) | aUserInfo | ||
[implementation] |
Initializes the notification with a name, object and dictionary
aNotificationName | the name of the notification | |
anObject | the associated object | |
aUserInfo | the associated dictionary |
Definition at line 87 of file CPNotification.j.
- (CPString) name | [implementation] |
Returns the notification name.
Definition at line 104 of file CPNotification.j.
+ (CPNotification) notificationWithName: | (CPString) | aNotificationName | ||
object: | (id) | anObject | ||
[implementation] |
Creates a new notification with the specified name and object.
aNotificationName | the name of the notification | |
anObject | the associated object |
Definition at line 65 of file CPNotification.j.
+ (CPNotification) notificationWithName: | (CPString) | aNotificationName | ||
object: | (id) | anObject | ||
userInfo: | (CPDictionary) | aUserInfo | ||
[implementation] |
Creates a new notification with the specified name, object and dictionary.
aNotificationName | the name of the notification | |
anObject | the associated object | |
aUserInfo | the associated dictionary |
Definition at line 54 of file CPNotification.j.
- (id) object | [implementation] |
Returns the notification's object.
Definition at line 112 of file CPNotification.j.
- (CPDictionary) userInfo | [implementation] |
Returns the notification's dictionary.
Definition at line 120 of file CPNotification.j.