Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whenXXXDo: convenience methods should be removed #58

Open
plantec opened this issue Jun 29, 2023 · 2 comments
Open

whenXXXDo: convenience methods should be removed #58

plantec opened this issue Jun 29, 2023 · 2 comments

Comments

@plantec
Copy link
Collaborator

plantec commented Jun 29, 2023

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
Copy link
Collaborator Author

plantec commented Jun 29, 2023

related to #44

@tinchodias
Copy link
Collaborator

Also related to pharo-graphics/Bloc#257

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants