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 listeners which are called standalone #878

Closed
aaronayres35 opened this issue Feb 1, 2021 · 1 comment
Closed

Refactor listeners which are called standalone #878

aaronayres35 opened this issue Feb 1, 2021 · 1 comment

Comments

@aaronayres35
Copy link
Contributor

ref: #864

Previously with on_trait_change handlers could be defined without arguments and occasionally code would call these handlers independent of any trait listening. With observe handlers are required to take a single event argument. So any such standalone callers are now passing event=None.
What we should do instead is, if any handler is such that we want to be able to call it stand alone, we should make it a regular old method that we call stand alone, and then have the handler call that method.

@aaronayres35
Copy link
Contributor Author

duplicate of #876
Forgot I had already opened an issue

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