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

Notification Dict Construction and Routing #147

Closed
rmorshea opened this issue Dec 16, 2015 · 2 comments
Closed

Notification Dict Construction and Routing #147

rmorshea opened this issue Dec 16, 2015 · 2 comments
Milestone

Comments

@rmorshea
Copy link
Contributor

One of the things I've been thinking about recently is how notification dicts ought to be made, and then routed to their appropriate event handlers. At the moment _notify_trait receives several arguments from a TraitType, constructs a change dict, and then distributes it to notify_change. In the future, it seems like making _notify_trait responsible for constructing these notification dicts will make it difficult to generalize this process for events other than changes. It makes more sense to me that TraitTypes would be responsible for constructing dicts such that _notify_trait would know how to route them.

@SylvainCorlay
Copy link
Member

@rmorshea _notify_trait is meant to disappear to the benefit of direct calls to notify_change. The only reason why it is still around is because ipywidgets overloads it (i.e. uses the private method). As soon as ipywidgets 5.0 is released and uses notify_change, we will remove the _notify_trait method for good.

@rmorshea
Copy link
Contributor Author

@SylvainCorlay The only reason I can see something like notify_trait being useful is if there were a generalized way of selecting the appropriate event handlers based on information given in the dict. Is that something worth considering for the future, or do you see a series of methods like notify_<type> being employed instead?

@rmorshea rmorshea closed this as completed Jan 7, 2016
@minrk minrk added this to the no action milestone Jan 13, 2016
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

3 participants