We could solve this in a couple of ways, but I'm not sure which is the best way to go:
"output": ['String', 'Number']
And the code converter of the custom block could generate a parseInt(inputValue) when a number is passed.
The advantage of this is that you need to write the conversion only once (in contradiction to the first solution, where the conversion logic needs to be repeated in all blocks that need it). But how can a non-technical user see which conversion he needs. He only sees in the editor that both blocks cannot be linked together. But I don't think he can see why it is rejected? Is there a solution to visalize that?
--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yea , convert everything ( number , float ... ) to string , it will
surely slow down the system .
But a wise note is that computer time is much cheaper than human time
, the time it takes for an user to drop a "conversion block" worth
much more than a controller to do extra works with every conversion .
For more advance user , you surely need to use conversion block !.