Commit 54565cde authored by Evan W. Patton's avatar Evan W. Patton Committed by Jeffrey Schiller

Fix component methods in typeblocking

Fixes #995

Change-Id: Icc3c90f9b5d18925031e1183d84ca84310208e7b
parent e2b5693d
......@@ -549,11 +549,10 @@ Blockly.Blocks.component_method = {
typeblock : function(){
var componentDb = Blockly.mainWorkspace.getComponentDatabase();
var tb = [];
var typeName;
var typeNameDict = {};
componentDb.forEachInstance(function(instance) {
typeNameDict[instance.typeName] = true;
componentDb.forMethodInType(typeName, function(_, methodName) {
componentDb.forMethodInType(instance.typeName, function(_, methodName) {
tb.push({
translatedName: Blockly.Msg.LANG_COMPONENT_BLOCK_METHOD_TITLE_CALL + instance.name +
'.' + componentDb.getInternationalizedMethodName(methodName),
......@@ -573,7 +572,7 @@ Blockly.Blocks.component_method = {
componentDb.getInternationalizedComponentType(componentType) + '.' +
componentDb.getInternationalizedMethodName(methodName),
mutatorAttributes: {
component_type: typeName,
component_type: componentType,
method_name: methodName,
is_generic: 'true'
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment