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

Refactor change handlers which are called standalone #876

Open
aaronayres35 opened this issue Feb 1, 2021 · 0 comments
Open

Refactor change handlers which are called standalone #876

aaronayres35 opened this issue Feb 1, 2021 · 0 comments

Comments

@aaronayres35
Copy link
Contributor

see the motivating PR #864
Previously with on trait change, some change handlers would take no arguments and be called standalone completely separately of any trait change trigger.

Now, with observe, the handlers are forced to take a single argument event, and where these handlers were called standalone we pass event=None as an argument. These could be refactored so that the code called independently is wrapped in a normal method. Then this method can be called whenever it is needed on its own, and also called by the handler.

@rahulporuri rahulporuri changed the title refactor change handlers called standalone Refactor change handlers which are called standalone Feb 2, 2021
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

1 participant