Blockly.Blocks.math.TOOLTIPS_BY_OP_. Blockly.Extensions.buildTooltipForDropdown() revealed that Blockly.MSG has no messages defined at the time that it is called. It appears that the "math_op_tooltip"--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
My 2c, but at a guess, you're including the messages file(s) into your HTML your block definitions file.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
--
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+unsubscribe@googlegroups.com.
If you can do a fresh clone of the develop branch and run the Code demo without this error then the problem is clearly mine.
By the way, I open Blockly as file://. Don't know if that's relevant.
I'm away from home for a day or so now, and will not be able to further investigate my end until I return. I'm thinking I should do a fresh clone myself and try again.
Regards,
Murray
I fixed the validation and incorrect warning. Try resyncing to develop and let me know.
On Thu, Jan 26, 2017 at 2:22 PM, Murray Lang <murray...@gmail.com> wrote:
Sorry, you said so.
OK, I have another problem as well then. I'll get back to you on this in a couple of days.
Cheers,
Murray
--
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.
Hello Andrew,
--
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+unsubscribe@googlegroups.com.
You can do this by creating the FieldDropdown object in the extension, and then adding it to the block by calling .appendField(..) on some input. By creating it at that time, the extension can pass in the generator as a constructor option.field_dropdown args have some additional processing. The static message strings are processed to extract prefix and suffix label fields (see docs), a feature not available on generated dropdown options. Having the ability to add an option generator to an existing dropdown after it has gone through this prefix/suffix extraction is probably a recipe for unexpected results.Given that, I think the current status is sufficient. It may feel a little odd to write the blocks that use such extensions, but it is certainly possible. It is probably worth a demo and some additional docs, though.
Hello Andrew,So far we had hard times defining blocks with mutators. Most of those blocks with mutators were erroneous. Wİll this update offer some good things about the mutators?
--
quando_editor.defineAction({
name: 'Show "', title: 'Show Text',
interface: [{ name: ID_GREETING, title: '"', text: '.type your text here..' }, { title: '"' }],
javascript: function (block) {
return 'quando.text("' + quando_editor.getText(block, ID_GREETING) + '");\n';
}
}); quando_editor.defineBlock({
// TODO must be in a vitrine...?
name: LABEL_TO_BLOCK, title: 'Label', category: 'dig', colour: self.CONFIG.RULE_COLOUR,
interface: [
{
name: LABEL_TO_MENU,
menu: _label_menu
},
],
javascript: _label_javascript,
}); let _label_javascript = function (block) {
let menuid = quando_editor.getMenu(block, LABEL_TO_MENU);
// find when block on id, then get it's title
let whenblock = Blockly.mainWorkspace.getBlockById(menuid);
let title = quando_editor.getText(whenblock, WHEN_VITRINE_TEXT);
var result = `quando.addLabel("${menuid}", "${title}");\n`;
return result;
} let _label_menu = function () {
let topBlocks = Blockly.mainWorkspace.getAllBlocks();
let choices = [['-----', 0]];
for (var block of topBlocks) {
if (block.type == PREFIX + WHEN_VITRINE_BLOCK) {
let text = quando_editor.getText(block, 'title');
choices.push([text, block.id]);
}
}
return choices;
}