Commit fd380eee authored by Evan W. Patton's avatar Evan W. Patton Committed by Susan Rati Lane

Filter Form generic blocks out of typeblock (#1928)

Change-Id: Ic9c1a3046c06dcbc582194f013f895d2ed512fc1
parent f889fdd4
...@@ -495,6 +495,8 @@ Blockly.Blocks.component_event = { ...@@ -495,6 +495,8 @@ Blockly.Blocks.component_event = {
}); });
}); });
delete types['Form'];
Object.keys(types).forEach(function(typeName) { Object.keys(types).forEach(function(typeName) {
componentDb.forEventInType(typeName, function(_, eventName) { componentDb.forEventInType(typeName, function(_, eventName) {
tb.push({ tb.push({
...@@ -830,6 +832,9 @@ Blockly.Blocks.component_method = { ...@@ -830,6 +832,9 @@ Blockly.Blocks.component_method = {
}); });
}); });
}); });
delete typeNameDict['Form'];
goog.object.forEach(typeNameDict, function(componentType) { goog.object.forEach(typeNameDict, function(componentType) {
componentDb.forMethodInType(componentType, function(_, methodName) { componentDb.forMethodInType(componentType, function(_, methodName) {
tb.push({ tb.push({
...@@ -1186,6 +1191,9 @@ Blockly.Blocks.component_set_get = { ...@@ -1186,6 +1191,9 @@ Blockly.Blocks.component_set_get = {
} }
function pushGenericBlock(prefix, mode, property, typeName) { function pushGenericBlock(prefix, mode, property, typeName) {
if (typeName === 'Form') {
return; // Skip generation of 'any Form' blocks
}
tb.push({ tb.push({
translatedName: prefix + componentDb.getInternationalizedComponentType(typeName) + '.' + translatedName: prefix + componentDb.getInternationalizedComponentType(typeName) + '.' +
componentDb.getInternationalizedPropertyName(property), componentDb.getInternationalizedPropertyName(property),
......
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