-
Notifications
You must be signed in to change notification settings - Fork 647
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
Events are notified twice when listing for ANY and a specific value #1334
Comments
#1333 is a potential fix |
This is the defined behavior of the DAL with respect to ANY, as confirmed with Joe Finney, |
I'm surprised that this is standard DAL behaviour as I "fixed" it pxt-microbit code. To be precise a specific event triggers currently 4 notifications in pxt-microbit. I would expect that 1 event triggers 2 notifications only: the specific one and ANY. @tballmsft Would it be helpful to analyze the behaviour of MicroPython? |
My example was overly complicated. Please have a look here: |
@abchatra The behavior is still odd. As of today, the simulator shows 1 and the real device shows 4 when running my example: https://makecode.microbit.org/_CLjbK0asz6zx |
For what it's worth, this same bug occurred in arcade microsoft/pxt-arcade#959, and was fixed in that case with microsoft/pxt-common-packages#829 |
@philipphenkel But #2382 |
@martinwork I already had a look at #2382. It's a slightly different case. |
Describe the bug
Events are notified twice when listing for ANY and a specific value for the same event source. This is caused by the implementation of registerWithDal.
To Reproduce
Steps to reproduce the behavior:
Run https://makecode.microbit.org/_MwM3KfKzCaU0
Press button A or B: it shows 2
Expected behavior
Event should be notified only once. Press button A or B: it shows 1
Screenshots

Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: