mirko.viviani@gmail.com
)ayers@fsfe.org
)Version: 25326
Date: 2007-07-12 08:39:22 +0200 (Don, 12 Jul 2007)
Copyright: (C) 2000,2002,2003,2004,2005 Free Software Foundation, Inc.
- Declared in:
- EOControl/EOObserver.h
- Conforms to:
- EOObserving
- Declared in:
- EOControl/EOObserver.h
NSRunLoop currentRunLoop
with EOFlushDelayedObserverRunLoopOrdering to invoke [-notifyObserversUpToPriority:]
with EOObserverPrioritySixth. In general this mechanism is used by
EOAssociation
subclasses and in part
EODisplayGroup
or even
EOEditingContext
.
Registers the observer with the receiver so that it will dispatch [EODelayedObserver -subjectChanged] either immediately, if the observers priority is EOObserverPriorityImmediate, or for the next invocation of -notifyObserversUpToPriority: . If this method is invoked during the processing of -notifyObserversUpToPriority: , then the dispatch will be enqueue for the current processing.
Upon the first invocation within a run loop, this
method registers a callback method to have
[-notifyObserversUpToPriority:]
invoked with EOObserverPrioritySixth with the
NSRunLoop currentRunLoop
with
EOFlushDelayedObserverRunLoopOrdering
and the receivers run loop modes.
The observer is not retained and should be
removed from the receiver with
[-dequeueObserver:]
during the EODelayedObservers
NSObject dealloc
method.
Dispatches registered observer notifications by sending [EODelayedObserver -subjectChanged] to all registered observers of the receiver. During the processing new enqueObserver: methods will be honored. It is up toe the callers to ensure no loops result.
This method is invoked automatically with EOObserverPrioritySixth during each run loop after an invocation of -enqueueObserver: .
Note that unlike the reference implementation, we dequeue the observer after dispatching [EODelayedObserver -subjectChanged] .
NSRunLoop
).
NSRunLoop
).
- Declared in:
- EOControl/EOObserver.h
This is the central coordinating class of the change tracking system of EOControl. It manages the observers <EOObserving> and the objects to be observed. No instances of this class should be needed or created. All methods for coordinating the tracking mechanism are class methods.
Observers must implement the <EOObserving> protocol, in particular [<EOObserving>-objectWillChange:] while the observed objects must invoke [NSObject -willChange] . Invoke [+addObserver:forObject:] to register an observer for a particular object. That will setup for [<EOObserving>-objectWillChange:] to be invoked on the observer each time [NSObject -willChange] gets called. To remove an observer invoke +removeObserver:forObject: . For observers who wish to be notified for every change the methods [+addOmniscientObserver:] and [+removeOmniscientObserver:] can be used.
Adds the observer to be notified with a [<EOObserving>-objectWillChange:] on the first of consecutive [NSObject -willChange] methods invoked on the object.
This does not retain the object. It is the observers responsibility to unregister the object with [+removeObserver:forObject:] before the object ceases to exist. The observer is also not retained. It is the observers responsibility to unregister before it ceases to exist.
Both observer and object
equality are considered equal through pointer
equality, so an observer observing
multiple objects considered
isEqual:
will recieve multiple
observer notifications, objects
considered isEqual:
may contain
different sets of observers, and an
object can have multiple observers
considered isEqual:
.
nil
.
nil
as the object to insure that the new changes will be forwarded to the observer. The observer notification can be suppressed with invocations of [+suppressObserverNotification]
which must be paired up with invocations of [+enableObserverNotification]
before they are dispatched again.
- Declared in:
- EOControl/EOObserver.h
- Declared in:
- EOControl/EOObserver.h
- Declared in:
- EOControl/EOObserver.h
- Conforms to:
- NSObject