Blockly.Blocks['SendElementTest'] = {
init: function () {
var subjectShadow = this.workspace.newBlock('text');
subjectShadow.setShadow(true);
subjectShadow.initSvg();
subjectShadow.render();
subjectShadow.setFieldValue('Subject', 'TEXT');
var subject = subjectShadow.outputConnection;
this.appendValueInput('SendElementTest')
.appendField('Send', 'SendField')
.appendField('Recipient', 'Recipient');
this.appendValueInput('Subject')
.setCheck('String')
.appendField(' ')
.appendField('Subject');
var cc = this.getInput('Subject').connection;
cc.connect(subject);
this.setColour('#006064');
this.setInputsInline(false);
this.setNextStatement(true);
this.setPreviousStatement(true);
}
};
Also, at certain other places, I get other type of exception:
=========err Error: The text content is null.
at t.getTextContent (blockly_compressed.js:715:191)
at t.render_ (blockly_compressed.js:746:33)
at t.getSize (blockly_compressed.js:718:197)
at new Field$$module$build$src$core$renderers$measurables$field (blockly_compressed.js:843:715)
at RenderInfo$$module$build$src$core$renderers$geras$info.createRows_ (blockly_compressed.js:910:75)
at RenderInfo$$module$build$src$core$renderers$geras$info.measure (blockly_compressed.js:908:340)
at Renderer$$module$build$src$core$renderers$geras$renderer.render (blockly_compressed.js:1011:247)
at BlockSvg$$module$build$src$core$block_svg.renderEfficiently (blockly_compressed.js:1206:70)
at renderBlock$$module$build$src$core$render_management (blockly_compressed.js:163:335)
at doRenders$$module$build$src$core$render_management (blockly_compressed.js:161:348)
Please let me know if you could help me guide in the right direction.
Appreciate your help!
Thanks,
Lax