Hi,
I have an existing Blockly proof of concept integration that I've set up (and it's working well), but I'm trying to improve the user experience a little. I've created a number of custom blocks which are listed in the toolbox which all work well. Each block's fields and values typically have shadow values to make it easier for the user to get up and running; they just drop it on the canvas and off they go rather than having to create new variables and the like.
However, I'd like to create a single top-level block when the workspace is rendered and the user will simply populate this block. But I have some problems:
1. When I create my custom top-level block via code ("startBlock = workspace.newBlock(identifier)") it gets rendered onto the canvas without the shadow values. I kinda understand why (these are functions of the toolbox registration, not the block definition), but is there any way to create a block as it would be generated by the toolbox, including these shadow values?
2. I have toyed with the idea of trying to stop the user creating any other top-level blocks (as they make zero sense in this scenario). I could simply throw an exception when they try and save the definition, but are there any nicer ways?
3. I am having some browser issues which are entirely down to the environment in which this is running. I've gotten around most of them by setting sounds to false and by explicitly setting the X-UA-Compatible flag to IE10 (don't ask me why - 9 fails and so does 11). Unfortunately this is an embedded browser so the chances of it being updated are minimal, but are there any other good tips that people have found to improve compatibilty with downlevel browsers?
Regards,
Craig.