Event system problem?
wuyts at iam.unibe.ch
Sun Jun 29 13:30:12 UTC 2003
I am playing with the Squeak events system (NOT the one for Morphs!),
and I have the impression that something is wrong with unregestering
Unregestering for actions work, as shown by the unit tests for the
events. But unregestering for individual objects seems to be broken,
unless these objects registered for the #changed: event.
For example, the following piece of code does not work as expected:
| eventSource dependentObject |
eventSource := EventManager new.
dependentObject := Object new.
"register - dependentObject becomes dependent"
when: #anEvent send: #error to: dependentObject.
eventSource removeDependent: dependentObject.
[eventSource triggerEvent: #anEvent]
do: [:exc | self halt: 'Should not be!'].
Roel Wuyts Software
roel.wuyts at iam.unibe.ch University of Bern,
Board Member of the European Smalltalk User Group: www.esug.org
More information about the Squeak-dev