pharo-graphics / Toplo

A widget framework on top of Bloc
MIT License
17 stars 8 forks source link

whenXXXDo: convenience methods should be removed #58

Open plantec opened 1 year ago

plantec commented 1 year ago

because they introduce limitation for elements event handlers management. example:

but := ToButton new.
but whenClickedDo: [:event | bla bla ].

can be coded as :

but := ToButton new.
handler := BlEventHandler on: BlClickedEvent do: [:event | bla bla ].
but addEventHandler: handler.

which allows to remove/replace the event handler as in:

but removeEventHandler: handler.
handler := ...
but addEventHandler: handler.
plantec commented 1 year ago

related to #44

tinchodias commented 11 months ago

Also related to https://github.com/pharo-graphics/Bloc/issues/257