Comments (2)
Hi,
I fear this part is a bit confusing and not very clean.
You are able to use getInputTargetBlock by block.getInputTargetBlock(name)
. This will probably lead to a compilation error if you just use it like this, since getInputTargetBlock is not defined on CustomBlock..
I would suggest sth. like this.
toLuaCode(block: any): string | any[] {
let child_block = block.getInputTargetBlock('UPDATE_SCRIPT');
if(child_block)
do{
// do something here with each statement block that was inserted in the statement input
}while (child_block = child_block.getNextBlock());
}
from ngx-blockly.
Thank you very much! This solved the issue.
from ngx-blockly.
Related Issues (20)
- Custom Block - How to implement callback function that calls function in parent component HOT 3
- Add import "blockly/blocks" in app.module.ts HOT 1
- Dozens of "No message string for " warning HOT 14
- Generating code issue HOT 2
- [email protected] depends on angular 14 HOT 1
- ERROR TypeError: Unknown block type: controls_if HOT 3
- Readonly disappears forever if window is resized while not readonly HOT 4
- Migrating from ngx-blockly 10.0.16 to 12.0.5 HOT 5
- Blockly mainWorkspace undefined HOT 7
- Option `defaultBlocks` is completely useless. HOT 2
- Initiliazing workspace with blocks HOT 1
- Code generator limitation HOT 3
- new variable in block for mutator HOT 1
- After reloading from storage, Blocks don't receive the BLOCK_MOVE event anymore HOT 1
- Custom generator and blocks HOT 3
- How to import custom block into built-in Category HOT 6
- #Custom block: how to get data from parent component with Constructor HOT 2
- Unknown block type: ActionBlock - when use several custom blocks in different categories. HOT 8
- How to make custom block from built-in block in FUNCTIONS_CATEGORY HOT 5
- Custom Block - Is it possible to define twice in one component? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-blockly.