Skip to content

Custom field validators #3

@vinderdevgn

Description

@vinderdevgn

not able to call validators in custom field

Blockly.Blocks['display_led_matrix'] = {
init: function () {

var valid = function(){
  console.log("this valid ");
  // console.log("valid call"+v);
  // console.log("test009= "+this.getFieldValue('mcolor1_'));

};
this.appendDummyInput()
.appendField("show LEDS");
this.appendDummyInput()
.appendField("Select color")
//.appendField(new Blockly.FieldColour('#000000',this.select_function()), 'mcolor1_')
// Warninig: This name (mcolor_) must not be changed!
.appendField(new Blockly.CustomFieldColour('#fff000',valid), 'mcolor_');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions