You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@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.
@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?
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 aTraitType
, constructs a change dict, and then distributes it tonotify_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 thatTraitTypes
would be responsible for constructing dicts such that_notify_trait
would know how to route them.The text was updated successfully, but these errors were encountered: