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

Makecode, if then else block, false is dropped to the canvas #10328

Open
PSLLSP opened this issue Jan 1, 2025 · 0 comments
Open

Makecode, if then else block, false is dropped to the canvas #10328

PSLLSP opened this issue Jan 1, 2025 · 0 comments

Comments

@PSLLSP
Copy link

PSLLSP commented Jan 1, 2025

Makecode has block if else that generates code if .. else if .. else if .. else. This is useful block but it is full of troubles.

  1. New else if section can be added only at the end of the block (before the last else). It is not possible to insert new else if section in the middle (+ button is missing at inner else if parts)

  2. It is possible to delete any else if part (-) button of the complex statement but there is no way to add it back later (see point 1)

  3. When else if parts are added (+) or deleted (-), false value is drooped to the "desk", these values cannot be selected and deleted. Well, man has to exit editor and then reopen project, then it is possible to select and delete those disconnected false blocks. And there could be many of them, it is not easy task to clean up the desk... It is possible that more then 1 false block is dropped for each else if section... This is a BUG in the editor.

This block is useful but I have stopped to use it because it is buggy (point 3) and difficult to use (point 1).

Hint, Try to use use this block to write event handler for DPAD messages, 16 "if else" sections has to be added to handle 2 states of 8 buttons. that is a long statement. It is not easy to change order of conditions in such statement or insert new condition to the middle of the block... Some details are here https://kitronik.co.uk/blogs/resources/adding-bluetooth-remote-control-move-mini

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