API  1.0.0
CPNotification Class Reference

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

#import <CPNotification.h>

+ Inheritance diagram for CPNotification:

Instance Methods

(id) - init
 
(id) - initWithName:object:userInfo:
 
(CPString- name
 
(id) - object
 
(CPDictionary- userInfo
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPNotification+ notificationWithName:object:
 
(CPNotification+ notificationWithName:object:userInfo:
 
- 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
 

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

◆ init()

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

Reimplemented from CPObject.

Definition at line 69 of file CPNotification.j.

◆ initWithName:object:userInfo:()

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

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 83 of file CPNotification.j.

◆ name()

- (CPString) name
implementation

Returns the notification name.

Definition at line 100 of file CPNotification.j.

◆ notificationWithName:object:()

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

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 61 of file CPNotification.j.

◆ notificationWithName:object:userInfo:()

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

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 50 of file CPNotification.j.

◆ object()

- (id) object
implementation

Returns the notification's object.

Definition at line 108 of file CPNotification.j.

◆ userInfo()

- (CPDictionary) userInfo
implementation

Returns the notification's dictionary.

Definition at line 116 of file CPNotification.j.


The documentation for this class was generated from the following files: