Closed GoogleCodeExporter closed 8 years ago
same here, my app stoped working when updated to latest revision, changing the
line to this works and maintains the intention of the check:
if (this.CURSOR && this.sourceBlock_ && this.sourceBlock_.editable) {
Original comment by luismarianoguerra@gmail.com
on 2 Aug 2013 at 8:37
Same here as well.
Running:
Blockly.Custom.loadDefaultBlocks = function() {
var defaultXml =
'<xml>' +
' <block type="vResult" deletable="false" x="25" y="25">' +
' <value name="VALUE">' +
' <block type="math_number">0</block>' +
' </value>' +
' </block>' +
'</xml>';
Blockly.Xml.domToWorkspace(Blockly.mainWorkspace, Blockly.Xml.textToDom(defaultXml));
};
// Definição da variável de resultado
Blockly.Language.vResult = {
helpUrl: Blockly.LANG_VARIABLES_SET_HELPURL,
init: function () {
this.setColour(330);
this.appendValueInput('VALUE')
.setCheck('Number')
.appendTitle('Result =');
this.setTooltip(Blockly.LANG_VARIABLES_SET_TOOLTIP);
}
};
Blockly.JavaScript.vResultado = function () {
// TODO
return "";
};
$(document).ready(function() {
// Initialize Blockly
// ...
// Load default values
Blockly.Custom.loadDefaultBlocks();
});
Results in:
Uncaught TypeError: Cannot read property 'editable' of null
Original comment by adriano....@gmail.com
on 2 Aug 2013 at 3:24
Changing the code to be loaded in Blockly to:
<xml>
<block type="vResultado" deletable="false" x="25" y="25">
<value name="VALUE">
<block type="math_number">
<title name="NUM">0</title>
</block>
</value>
</block>
</xml>
works.
Original comment by adriano....@gmail.com
on 2 Aug 2013 at 4:56
My fault. The fix is out for code review and will land shortly.
Original comment by neil.fra...@gmail.com
on 3 Aug 2013 at 3:05
Fixed in r1177. Thanks for the bug report.
Original comment by neil.fra...@gmail.com
on 3 Aug 2013 at 3:43
Original issue reported on code.google.com by
agash...@gmail.com
on 1 Aug 2013 at 11:22