-
Notifications
You must be signed in to change notification settings - Fork 85
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
Don't distinguish notification handlers on "dispatch" value #1212
Comments
I strongly believe that the current behaviour is not the right one, and we should change it.
|
An example in the wild: if you look at |
Sorry; wrong argument: I meant the |
The Scenario 1:
Should the second call fail? If not, is the handler dispatched via "same", or via "ui"? If the second call should fail, that is basically the framework saying "the use case supported is that each handler should only have one dispatch method at any given time. If you need to call the handler with more than one dispatch, wrap the handler into a new callable so they do not compare equally". If the second call does not fail, that would be consistent with Scenario 2:
Should the second call fail to help catch programming error? Scenario 3 (depends on 1 and 2):
|
I should clarify that the surprise I had with |
For the record, I'd prefer keeping
This issue was motivated by a PR in a project trying to convert all
On the argument taking inspiration from Qt API, recently I added |
When I tried to reimplement Envisage's ExtensionRegistry using These are the code blocks that are relevant: Envisage wants to be able to register a callable called (Note: The issue here is about the |
What is the current status/course of action for this issue? I'm unsure if this has been discussed/decided offline or if it is still up for debate |
Let's close this issue (as rejected). We'll stick with what we have right now. The plan is the migrate quite a lot of code to the observe framework in the next few weeks; we can always re-open this issue if we decide that migration is being adversely affected. |
The use of
dispatch
when distinguishing (and in particular when removing) notification handlers has proved surprising; I think we should revisit this for 6.2, and possibly consider removing it.Related: PR #1195.
The text was updated successfully, but these errors were encountered: