Fixes#1958
This will drop the input when it's in the empty string state. This
causes the block to remove the input and re-add it when the text
is reverted, but prevents the breakage. A followup fix should leave
the input alone instead of removing it, but this works for now.
Fixes#1344
Extends the event listener on procedure caller blocks to also check
for their definition being enabled/disabled and update their own
state in response.
* Removing goog.arrays.equals() in blocks/procedures.js, with minor refactor.
* Replacing goog.dom.createDom() in blocks/procedures.js, blocks/variables.js, blocks/variables_dynamic.js, and blocks/loops.js.
These namespaces use to contain the original block hue constants,
but were deprecated (via comment, except for procedures) over a year
ago. With the removal of those constants, the declarations were
creating empty, unused objects.
* Create prevBlock_ upon first call to onchange.
* Revert state upon an incompatible combination, bumping the new incompatible
block, instead of the old block. Thus, the shadow is never the bumped block.
Bug:
* The undo stack get caught in a loop, and will never undo back to a state
equivalent to the previous action.
* Making all blocks use the MSG colour values.
* Deprecating Blockly.Constants.Lists.HUE and similar constants.
* Removing deprecated Blockly.Blocks.lists.HUE constants.
* Allowing message references in the Block.setColour() parameter.
* Adding checking of older constants, ensuring they are not overwritten.
On updating the block 'text_getSubstring', the ordinal string 'ORDINAL1' is moved when the corresponding corresponding input field is moved so that the ordinal string does not end up at the end of the block.
Fix#1619. buildTooltipWithFieldValue() => buildTooltipWithFieldText()
The "value" of FieldVariables was the variable id.
However, we usually want the field text for the human visible tooltip.
Refactoring and renaming buildTooltipWithFieldValue to use the field
text.