CPObjectCPNotification
@implementation CPNotification : CPObject
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
.
Method Summary | |
---|---|
+(CPNotification) | notificationWithName:(CPString)aNotificationName object:(id)anObject Creates a new notification with the specified name and object. |
+(CPNotification) | notificationWithName:(CPString)aNotificationName object:(id)anObject userInfo:(CPDictionary)aUserInfo Creates a new notification with the specified name, object and dictionary. |
-(id) | init |
-(CPString) | name Returns the notification name. |
-(id) | object Returns the notification's object. |
-(CPDictionary) | userInfo Returns the notification's dictionary. |
Method Detail |
---|
+(CPNotification)notificationWithName:(CPString)aNotificationName object:(id)anObject
aNotificationName
- the name of the notificationanObject
- the associated object+(CPNotification)notificationWithName:(CPString)aNotificationName object:(id)anObject userInfo:(CPDictionary)aUserInfo
aNotificationName
- the name of the notificationanObject
- the associated objectaUserInfo
- the associated dictionary-(id)init
CPUnsupportedMethodException
- always, because the method should not be used-(CPString)name
-(id)object
-(CPDictionary)userInfo
Created on Sat Sep 13 14:15:43 PDT 2008