API 0.9.5
CPNotification Class Reference

A notification that can be posted to a CPNotificationCenter. More...

#import <CPNotification.h>

Inheritance diagram for CPNotification:

List of all members.

Instance Methods

(id) - init
(id) - initWithName:object:userInfo:
(CPString- name
(id) - object
(CPDictionary- userInfo

Class Methods

(CPNotification+ notificationWithName:object:
(CPNotification+ notificationWithName:object:userInfo:

Detailed Description

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 2 of file CPNotification.h.


Method Documentation

- (id) init
Exceptions:
CPUnsupportedMethodExceptionalways, because the method should not be used

Definition at line 70 of file CPNotification.j.

- (id) initWithName: (CPString aNotificationName
object: (id)  anObject
userInfo: (CPDictionary aUserInfo 

Initializes the notification with a name, object and dictionary

Parameters:
aNotificationNamethe name of the notification
anObjectthe associated object
aUserInfothe associated dictionary
Returns:
the initialized notification

Definition at line 84 of file CPNotification.j.

- (CPString) name

Returns the notification name.

Definition at line 101 of file CPNotification.j.

+ (CPNotification) notificationWithName: (CPString aNotificationName
object: (id)  anObject 

Creates a new notification with the specified name and object.

Parameters:
aNotificationNamethe name of the notification
anObjectthe associated object
Returns:
the new notification

Definition at line 62 of file CPNotification.j.

+ (CPNotification) notificationWithName: (CPString aNotificationName
object: (id)  anObject
userInfo: (CPDictionary aUserInfo 

Creates a new notification with the specified name, object and dictionary.

Parameters:
aNotificationNamethe name of the notification
anObjectthe associated object
aUserInfothe associated dictionary
Returns:
the new notification

Definition at line 51 of file CPNotification.j.

- (id) object

Returns the notification's object.

Definition at line 109 of file CPNotification.j.

- (CPDictionary) userInfo

Returns the notification's dictionary.

Definition at line 117 of file CPNotification.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines