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

Code generation from Blockly broken on Blockly API v9.3.0+ #6

Open
Jaronimous opened this issue May 1, 2023 · 0 comments
Open

Code generation from Blockly broken on Blockly API v9.3.0+ #6

Jaronimous opened this issue May 1, 2023 · 0 comments

Comments

@Jaronimous
Copy link
Collaborator

For the generation of code from the Blockly workspace to the Monaco text environment, which is part of the BSc Project in the branch bscproject_jchin, the Blockly API function [Block].getDescendants() is used to get all children and connections from a starting block, so that the adequate code can be generated for all active blocks in the Blockly workspace. The functionality of this function has changed since API version 9.3.0 to only show the children, and not the blocks connected to the children.

For example, when using the State Machine language, if there's a workspace containing a starting block machine 'a' with a state state 'b' and two transitions on 'c' to 'd' and on 'e' to 'f', the code generation using API version 9.2.1 will show the following:
machine a state b { on c to d on e to f }

But since API version 9.3.0, it will only show this:
machine a state b { on c to d }

A quick fix for this issue is to use the latest version of the Blockly API before 9.3.0, which is 9.2.1, but a more sustainable solution would be to rewrite the code generation part, so that it either adapts to the new getDescendants() functionality or to manually traverse through all children and connections.

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

When branches are created from issues, their pull requests are automatically linked.

1 participant