块限制 input_value 到另一个块

Blockly restrict input_value to another block

在我的 Blockly 项目中,我有两个 3 个块 rcm_arcm_brcm_c

Blockly.defineBlocksWithJsonArray([{
  "type": "rcm_c",
  "message0": "Requirement block- rcm_a: %1 rcm_b: %2",
  "args0": [
    {
      "type": "input_value",
      "name": "rcm_a"
    },
    {
      "type": "input_value",
      "name": "rcm_b",
      "check": ["rcm_b"]
    }
  ],
  "output": "Text",
  "colour": "%{BKY_LOOPS_HUE}"
}]);

如您所见 rcm_c 的上述代码,我试图将第二个输入限制为块 rcm_b,但显然这似乎不起作用。相同的输入不会接受任何输入类型。这是 rcm_b 的代码:

Blockly.defineBlocksWithJsonArray([{
  "type": "rcm_b",
  "message0": "rcm_b %1",
  "args0": [
    {
      "type": "input_value",
      "name": "VALUE1",
      "check": "String"
    }
  ],
  "output": "Text",
  "colour": "%{BKY_LOOPS_HUE}"
}]);

我尝试按照 this guide 的语句堆栈部分(我知道我正在尝试键入检查输入而不是语句)来实现类型检查。我做错了什么?

非常感谢您的帮助!

啊,好像 rcm_b 的 'output' 需要 rcm_b!