Up

NSNotificationCenter class reference

Authors

Andrew Kachites McCallum (mccallum@gnu.ai.mit.edu)
Richard Frith-Macdonald (rfm@gnu.org)
Richard Frith-Macdonald (richard@brainstorm.co.uk)

Version: 1.23

Date: 2003/06/07 01:24:41

Copyright: (C) 1996,1999 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSNotification class
  2. Software documentation for the NSNotificationCenter class
  3. Software documentation for the NSNotificationCenter(GNUstep) category

Software documentation for the NSNotification class

NSNotification : NSObject

Declared in:
Foundation/NSNotification.h
Conforms to:
NSCopying
NSCoding
Standards:

Description forthcoming.

Method summary

notificationWithName: object: 

+ (NSNotification*) notificationWithName: (NSString*)name object: (id)object;

Create a new autoreleased notification by calling +notificationWithName:object:userInfo: with a nil user info argument.


notificationWithName: object: userInfo: 

+ (NSNotification*) notificationWithName: (NSString*)name object: (id)object userInfo: (NSDictionary*)info;

Create a new autoreleased notification. Concrete subclasses override this method to create actual notification objects.


name 

- (NSString*) name;

Concrete subclasses of NSNotification are responsible for implementing this method to return the notification name.


object 

- (id) object;

Concrete subclasses of NSNotification are responsible for implementing this method to return the notification object.


userInfo 

- (NSDictionary*) userInfo;

Concrete subclasses of NSNotification are responsible for implementing this method to return the notification user information.


Software documentation for the NSNotificationCenter class

NSNotificationCenter : NSObject

Declared in:
Foundation/NSNotification.h
Conforms to:
GCFinalization
Standards:

Description forthcoming.



Instance Variables for NSNotificationCenter Class

_table

@private void* _table;

Description forthcoming.





Method summary

defaultCenter 

+ (NSNotificationCenter*) defaultCenter;

Description forthcoming.


addObserver: selector: name: object: 

- (void) addObserver: (id)observer selector: (SEL)selector name: (NSString*)name object: (id)object;

Description forthcoming.


postNotification: 

- (void) postNotification: (NSNotification*)notification;

Posts notification to all the observers that match its NAME and OBJECT.
The GNUstep implementation calls -postNotificationName:object:userInfo: to perform the actual posting.


postNotificationName: object: 

- (void) postNotificationName: (NSString*)name object: (id)object;

Creates and posts a notification using the -postNotificationName:object:userInfo: passing a nil user info argument.


postNotificationName: object: userInfo: 

- (void) postNotificationName: (NSString*)name object: (id)object userInfo: (NSDictionary*)info;

The preferred method for posting a notification.
For performance reasons, we don't wrap an exception handler round every message sent to an observer. This means that, if one observer raises an exception, later observers in the lists will not get the notification.


removeObserver: 

- (void) removeObserver: (id)observer;

Description forthcoming.


removeObserver: name: object: 

- (void) removeObserver: (id)observer name: (NSString*)name object: (id)object;

Description forthcoming.


Software documentation for the NSNotificationCenter(GNUstep) category

NSNotificationCenter(GNUstep)

Declared in:
Foundation/NSNotification.h
Standards:

Description forthcoming.

Method summary

setImmutableInPost: 

- (BOOL) setImmutableInPost: (BOOL)flag;

Description forthcoming.


setLockingDisabled: 

- (BOOL) setLockingDisabled: (BOOL)flag;

Description forthcoming.



Up