Open tinchodias opened 4 months ago
For the record, I did a first try and failed to fix it. I share the code below.
I created this test in BlEventTest
:
testAnnouncementSet
| element events |
events := OrderedCollection new.
element := BlElement new.
element
addEventHandlerOn: BlClickEvent, BlMouseMoveEvent
do: [ :anEvent | events add: anEvent class ].
BlSpace
simulateMouseMoveInside: element;
simulateClickOn: element button: BlMouseButton primary;
simulateMouseDownOn: element; "should be ignored"
simulateClickOn: element button: BlMouseButton secondary.
self assert: events asArray equals: { BlMouseMoveEvent. BlClickEvent. BlClickEvent }
and created this extension in AnnouncementSet
:
enableIn: aBlElementEventDispatcher
^ self do: [ :each | each enableIn: aBlElementEventDispatcher ]
Reproduce with:
to get a "Instance of AnnouncementSet did not understand #enableIn:"
In Pharo12.