990 B
990 B
Lifecycle of a Blockly App
Using Blockly Tool
- generate new app
- configure
- run the dev server
- create a workspace, a toolbox, and some blocks
- run the exporter
- take your exported blockly files to where you want them
Blockly (De)Serialization
When Blockly.serialization.workspaces.load is called, serializers are called in order with state to deserialize.
Deserialization Order
- Variables
- Procedures
- Blocks Top-level blocks are deserialized in an arbitrary order.
- Type - constructs the block, calls its init method, mixes in extensions
- Attributes - including global block properties, like: x, y, collapsed, disabled, and data
- Extra state - see the Extensions and Mutators
- Parent Connection
- Icons - arbitrary order
- Fields - arbitrary order
- Input Blocks - both value and statement inputs, arbitrary order - recursive
- Next Blocks - recursive