diff --git a/blocks_vertical/control.js b/blocks_vertical/control.js index 01cd68a25d..8063ec089f 100644 --- a/blocks_vertical/control.js +++ b/blocks_vertical/control.js @@ -82,7 +82,6 @@ Blockly.Blocks['control_repeat'] = { "name": "TIMES", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -128,7 +127,6 @@ Blockly.Blocks['control_repeatForSeconds'] = { "name": "TIMES", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } } @@ -268,7 +266,6 @@ Blockly.Blocks['control_throw_error'] = { "name": "ERROR", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Hello!" } } @@ -363,7 +360,6 @@ Blockly.Blocks['control_wait'] = { "name": "DURATION", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } } @@ -389,7 +385,6 @@ Blockly.Blocks['control_waitsecondsoruntil'] = { "name": "DURATION", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -543,7 +538,6 @@ Blockly.Blocks['control_for_each'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -840,7 +834,6 @@ Blockly.Blocks['control_set_counter'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -950,7 +943,6 @@ Blockly.Blocks["control_if_return_else_return"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo" } }, @@ -959,7 +951,6 @@ Blockly.Blocks["control_if_return_else_return"] = { "name": "TEXT2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "bar" } } @@ -1038,7 +1029,6 @@ Blockly.Blocks['control_case'] = { "name": "CONDITION", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "ello" } } @@ -1066,7 +1056,6 @@ Blockly.Blocks['control_case_next'] = { "name": "CONDITION", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "ello" } } diff --git a/blocks_vertical/data.js b/blocks_vertical/data.js index 177d5fd6b1..9b417cbbf0 100644 --- a/blocks_vertical/data.js +++ b/blocks_vertical/data.js @@ -73,7 +73,6 @@ Blockly.Blocks['data_setvariableto'] = { "name": "VALUE", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "0" } } @@ -102,7 +101,6 @@ Blockly.Blocks['data_changevariableby'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } } @@ -254,7 +252,6 @@ Blockly.Blocks['data_addtolist'] = { "name": "ITEM", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "thing" } }, @@ -284,7 +281,6 @@ Blockly.Blocks['data_deleteoflist'] = { "name": "INDEX", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -335,7 +331,6 @@ Blockly.Blocks['data_insertatlist'] = { "name": "ITEM", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "thing" } }, @@ -344,7 +339,6 @@ Blockly.Blocks['data_insertatlist'] = { "name": "INDEX", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -374,7 +368,6 @@ Blockly.Blocks['data_replaceitemoflist'] = { "name": "INDEX", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -388,7 +381,6 @@ Blockly.Blocks['data_replaceitemoflist'] = { "name": "ITEM", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "thing" } } @@ -413,7 +405,6 @@ Blockly.Blocks['data_itemoflist'] = { "name": "INDEX", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -445,7 +436,6 @@ Blockly.Blocks['data_itemnumoflist'] = { "name": "ITEM", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "thing" } }, @@ -503,7 +493,6 @@ Blockly.Blocks['data_listcontainsitem'] = { "name": "ITEM", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "thing" } } @@ -583,7 +572,6 @@ Blockly.Blocks['data_itemexistslist'] = { "name": "INDEX", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -647,7 +635,6 @@ Blockly.Blocks['data_arraylist'] = { "name": "VALUE", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": '["a", "b", "c"]' } }, diff --git a/blocks_vertical/event.js b/blocks_vertical/event.js index 42beeb768b..7774d60786 100644 --- a/blocks_vertical/event.js +++ b/blocks_vertical/event.js @@ -215,7 +215,6 @@ Blockly.Blocks['event_whengreaterthan'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -493,7 +492,6 @@ Blockly.Blocks["event_whenjavascript"] = { "name": "JS", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } } diff --git a/blocks_vertical/live_tests.js b/blocks_vertical/live_tests.js index ee49a0df85..48422556df 100644 --- a/blocks_vertical/live_tests.js +++ b/blocks_vertical/live_tests.js @@ -92,8 +92,7 @@ Blockly.Blocks['field_textdropdown_test'] = { "args0": [ { "type": "field_textdropdown", - "name": "text", - "fieldName": "TEXT", + "name": "TEXT", "options": [ ['item1', 'item1'], ['item2', 'item2'], diff --git a/blocks_vertical/looks.js b/blocks_vertical/looks.js index 0ae4c6e4ee..192abf0bc5 100644 --- a/blocks_vertical/looks.js +++ b/blocks_vertical/looks.js @@ -42,7 +42,6 @@ Blockly.Blocks['looks_sayforsecs'] = { "name": "MESSAGE", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Hello!" } }, @@ -51,7 +50,6 @@ Blockly.Blocks['looks_sayforsecs'] = { "name": "SECS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 2 } } @@ -76,7 +74,6 @@ Blockly.Blocks['looks_say'] = { "name": "MESSAGE", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Hello!" } } @@ -101,7 +98,6 @@ Blockly.Blocks['looks_thinkforsecs'] = { "name": "MESSAGE", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Hello!" } }, @@ -110,7 +106,6 @@ Blockly.Blocks['looks_thinkforsecs'] = { "name": "SECS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 2 } } @@ -135,7 +130,6 @@ Blockly.Blocks['looks_think'] = { "name": "MESSAGE", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Hello!" } } @@ -156,7 +150,6 @@ Blockly.Blocks["looks_setFont"] = { "name":"font", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Helvetica" } }, @@ -165,7 +158,6 @@ Blockly.Blocks["looks_setFont"] = { "name":"size", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 14 } } @@ -188,8 +180,7 @@ Blockly.Blocks["looks_setColor"] = { "options":[ ["border","BUBBLE_STROKE"], ["fill","BUBBLE_FILL"], - ["text", - "fieldName": "TEXT","TEXT_FILL"] + ["text","TEXT_FILL"] ] }, { @@ -231,7 +222,6 @@ Blockly.Blocks["looks_setShape"] = { "name":"color", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -455,7 +445,6 @@ Blockly.Blocks['looks_changeeffectby'] = { "name": "CHANGE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 25 } } @@ -498,7 +487,6 @@ Blockly.Blocks['looks_seteffectto'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -537,7 +525,6 @@ Blockly.Blocks['looks_changesizeby'] = { "name": "CHANGE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -562,7 +549,6 @@ Blockly.Blocks['looks_setsizeto'] = { "name": "SIZE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 100 } } @@ -611,7 +597,6 @@ Blockly.Blocks['looks_changestretchby'] = { "name": "CHANGE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -638,7 +623,6 @@ Blockly.Blocks['looks_setstretchto'] = { "name": "STRETCH", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 100 } } @@ -821,7 +805,6 @@ Blockly.Blocks['looks_goforwardbackwardlayers'] = { "name": "NUM", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } } @@ -854,7 +837,6 @@ Blockly.Blocks['looks_goTargetLayer'] = { "name": "VISIBLE_OPTION", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } } @@ -877,7 +859,6 @@ Blockly.Blocks["looks_layersSetLayer"] = { "name": "NUM", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } } @@ -1016,7 +997,6 @@ Blockly.Blocks["looks_setStretch"] = { "name": "X", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 100 } }, @@ -1025,7 +1005,6 @@ Blockly.Blocks["looks_setStretch"] = { "name": "Y", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 100 } } diff --git a/blocks_vertical/motion.js b/blocks_vertical/motion.js index 5f3f53c1ff..1a0ef67a6a 100644 --- a/blocks_vertical/motion.js +++ b/blocks_vertical/motion.js @@ -42,7 +42,6 @@ Blockly.Blocks['motion_movesteps'] = { "name": "STEPS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -67,7 +66,6 @@ Blockly.Blocks['motion_movebacksteps'] = { "name": "STEPS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -100,7 +98,6 @@ Blockly.Blocks['motion_moveupdownsteps'] = { "name": "STEPS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -131,7 +128,6 @@ Blockly.Blocks['motion_turnright'] = { "name": "DEGREES", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 15 } } @@ -162,7 +158,6 @@ Blockly.Blocks['motion_turnleft'] = { "name": "DEGREES", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 15 } } @@ -193,7 +188,6 @@ Blockly.Blocks['motion_turnrightaroundxy'] = { "name": "DEGREES", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 15 } }, @@ -202,7 +196,6 @@ Blockly.Blocks['motion_turnrightaroundxy'] = { "name": "X", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } }, @@ -211,7 +204,6 @@ Blockly.Blocks['motion_turnrightaroundxy'] = { "name": "Y", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -242,7 +234,6 @@ Blockly.Blocks['motion_turnleftaroundxy'] = { "name": "DEGREES", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 15 } }, @@ -251,7 +242,6 @@ Blockly.Blocks['motion_turnleftaroundxy'] = { "name": "X", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } }, @@ -260,7 +250,6 @@ Blockly.Blocks['motion_turnleftaroundxy'] = { "name": "Y", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -285,7 +274,6 @@ Blockly.Blocks['motion_pointindirection'] = { "name": "DIRECTION", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 90 } } @@ -364,7 +352,6 @@ Blockly.Blocks['motion_pointtowardsxy'] = { "name": "X", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } }, @@ -373,7 +360,6 @@ Blockly.Blocks['motion_pointtowardsxy'] = { "name": "Y", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -447,7 +433,6 @@ Blockly.Blocks['motion_gotoxy'] = { "name": "X", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } }, @@ -456,7 +441,6 @@ Blockly.Blocks['motion_gotoxy'] = { "name": "Y", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -504,7 +488,6 @@ Blockly.Blocks['motion_glidesecstoxy'] = { "name": "SECS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -513,7 +496,6 @@ Blockly.Blocks['motion_glidesecstoxy'] = { "name": "X", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } }, @@ -522,7 +504,6 @@ Blockly.Blocks['motion_glidesecstoxy'] = { "name": "Y", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -547,7 +528,6 @@ Blockly.Blocks['motion_glidedirectionstepsinseconds'] = { "name": "STEPS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } }, @@ -566,7 +546,6 @@ Blockly.Blocks['motion_glidedirectionstepsinseconds'] = { "name": "SECS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -617,7 +596,6 @@ Blockly.Blocks['motion_glideto'] = { "name": "SECS", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -649,7 +627,6 @@ Blockly.Blocks['motion_changebyxy'] = { "name": "DX", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } }, @@ -658,7 +635,6 @@ Blockly.Blocks['motion_changebyxy'] = { "name": "DY", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -683,7 +659,6 @@ Blockly.Blocks['motion_changexby'] = { "name": "DX", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -708,7 +683,6 @@ Blockly.Blocks['motion_setx'] = { "name": "X", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -733,7 +707,6 @@ Blockly.Blocks['motion_changeyby'] = { "name": "DY", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -758,7 +731,6 @@ Blockly.Blocks['motion_sety'] = { "name": "Y", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -820,7 +792,6 @@ Blockly.Blocks['motion_ifonxybounce'] = { "name": "X", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } }, @@ -829,7 +800,6 @@ Blockly.Blocks['motion_ifonxybounce'] = { "name": "Y", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0 } } @@ -928,7 +898,6 @@ Blockly.Blocks['motion_scroll_right'] = { "name": "DISTANCE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -955,7 +924,6 @@ Blockly.Blocks['motion_scroll_up'] = { "name": "DISTANCE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } diff --git a/blocks_vertical/operators.js b/blocks_vertical/operators.js index 970eeccbd9..c0abf2837b 100644 --- a/blocks_vertical/operators.js +++ b/blocks_vertical/operators.js @@ -162,7 +162,6 @@ Blockly.Blocks['operator_random'] = { "name": "FROM", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -171,7 +170,6 @@ Blockly.Blocks['operator_random'] = { "name": "TO", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -196,7 +194,6 @@ Blockly.Blocks['operator_lt'] = { "name": "OPERAND1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } }, @@ -205,7 +202,6 @@ Blockly.Blocks['operator_lt'] = { "name": "OPERAND2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "50" } } @@ -230,7 +226,6 @@ Blockly.Blocks['operator_equals'] = { "name": "OPERAND1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } }, @@ -239,7 +234,6 @@ Blockly.Blocks['operator_equals'] = { "name": "OPERAND2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "50" } } @@ -264,7 +258,6 @@ Blockly.Blocks['operator_gt'] = { "name": "OPERAND1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } }, @@ -273,7 +266,6 @@ Blockly.Blocks['operator_gt'] = { "name": "OPERAND2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "50" } } @@ -298,7 +290,6 @@ Blockly.Blocks['operator_gtorequal'] = { "name": "OPERAND1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } }, @@ -307,7 +298,6 @@ Blockly.Blocks['operator_gtorequal'] = { "name": "OPERAND2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "50" } } @@ -332,7 +322,6 @@ Blockly.Blocks['operator_ltorequal'] = { "name": "OPERAND1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } }, @@ -341,7 +330,6 @@ Blockly.Blocks['operator_ltorequal'] = { "name": "OPERAND2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "50" } } @@ -366,7 +354,6 @@ Blockly.Blocks['operator_notequal'] = { "name": "OPERAND1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } }, @@ -375,7 +362,6 @@ Blockly.Blocks['operator_notequal'] = { "name": "OPERAND2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "50" } } @@ -574,7 +560,6 @@ Blockly.Blocks['operator_join'] = { "name": "STRING1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "apple " } }, @@ -583,7 +568,6 @@ Blockly.Blocks['operator_join'] = { "name": "STRING2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "banana" } } @@ -608,7 +592,6 @@ Blockly.Blocks['operator_join3'] = { "name": "STRING1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "apple " } }, @@ -617,7 +600,6 @@ Blockly.Blocks['operator_join3'] = { "name": "STRING2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "banana " } }, @@ -626,7 +608,6 @@ Blockly.Blocks['operator_join3'] = { "name": "STRING3", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "pear" } } @@ -651,7 +632,6 @@ Blockly.Blocks['operator_letter_of'] = { "name": "LETTER", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "1" } }, @@ -660,7 +640,6 @@ Blockly.Blocks['operator_letter_of'] = { "name": "STRING", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "apple" } } @@ -685,7 +664,6 @@ Blockly.Blocks['operator_length'] = { "name": "STRING", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "apple" } } @@ -710,7 +688,6 @@ Blockly.Blocks['operator_contains'] = { "name": "STRING1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "apple" } }, @@ -719,7 +696,6 @@ Blockly.Blocks['operator_contains'] = { "name": "STRING2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "a" } } @@ -744,7 +720,6 @@ Blockly.Blocks['operator_mod'] = { "name": "NUM1", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "" } }, @@ -753,7 +728,6 @@ Blockly.Blocks['operator_mod'] = { "name": "NUM2", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "" } } @@ -778,7 +752,6 @@ Blockly.Blocks['operator_round'] = { "name": "NUM", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "" } } @@ -823,7 +796,6 @@ Blockly.Blocks['operator_mathop'] = { "name": "NUM", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "" } } @@ -847,7 +819,6 @@ Blockly.Blocks['operator_advlog'] = { "name": "NUM1", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "" } }, @@ -856,7 +827,6 @@ Blockly.Blocks['operator_advlog'] = { "name": "NUM2", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "" } } @@ -876,10 +846,8 @@ Blockly.Blocks["operator_regexmatch"] = { { "type": "input_value", "name": "text", - "fieldName": "TEXT", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo bar" } }, @@ -888,7 +856,6 @@ Blockly.Blocks["operator_regexmatch"] = { "name": "reg", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo" } }, @@ -897,7 +864,6 @@ Blockly.Blocks["operator_regexmatch"] = { "name": "regrule", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "g" } } @@ -917,10 +883,8 @@ Blockly.Blocks["operator_replaceAll"] = { { "type": "input_value", "name": "text", - "fieldName": "TEXT", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo bar" } }, @@ -929,7 +893,6 @@ Blockly.Blocks["operator_replaceAll"] = { "name": "term", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo" } }, @@ -938,7 +901,6 @@ Blockly.Blocks["operator_replaceAll"] = { "name": "res", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "bar" } } @@ -958,10 +920,8 @@ Blockly.Blocks["operator_replaceFirst"] = { { "type": "input_value", "name": "text", - "fieldName": "TEXT", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo bar" } }, @@ -970,7 +930,6 @@ Blockly.Blocks["operator_replaceFirst"] = { "name": "term", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo" } }, @@ -979,7 +938,6 @@ Blockly.Blocks["operator_replaceFirst"] = { "name": "res", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "bar" } } @@ -1001,7 +959,6 @@ Blockly.Blocks["operator_getLettersFromIndexToIndexInText"] = { "name": "INDEX1", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 2 } }, @@ -1010,17 +967,14 @@ Blockly.Blocks["operator_getLettersFromIndexToIndexInText"] = { "name": "INDEX2", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 3 } }, { "type": "input_value", - "name": "text", - "fieldName": "TEXT", + "name": "TEXT", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Hello!" } } @@ -1042,17 +996,14 @@ Blockly.Blocks["operator_readLineInMultilineText"] = { "name": "LINE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, { "type": "input_value", - "name": "text", - "fieldName": "TEXT", + "name": "TEXT", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Text with multiple lines here" } } @@ -1115,7 +1066,6 @@ Blockly.Blocks["operator_boolify"] = { "name": "ONE", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } } @@ -1137,7 +1087,6 @@ Blockly.Blocks["operator_character_to_code"] = { "name": "ONE", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "a" } } @@ -1159,7 +1108,6 @@ Blockly.Blocks["operator_code_to_character"] = { "name": "ONE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 97 } } @@ -1181,7 +1129,6 @@ Blockly.Blocks["operator_lerpFunc"] = { "name": "ONE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -1190,7 +1137,6 @@ Blockly.Blocks["operator_lerpFunc"] = { "name": "TWO", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 3 } }, @@ -1199,7 +1145,6 @@ Blockly.Blocks["operator_lerpFunc"] = { "name": "AMOUNT", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 0.5 } } @@ -1221,7 +1166,6 @@ Blockly.Blocks["operator_advMath"] = { "name": "ONE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "" } }, @@ -1239,7 +1183,6 @@ Blockly.Blocks["operator_advMath"] = { "name": "TWO", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": "" } } @@ -1261,7 +1204,6 @@ Blockly.Blocks["operator_constrainnumber"] = { "name": "inp", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 50 } }, @@ -1270,7 +1212,6 @@ Blockly.Blocks["operator_constrainnumber"] = { "name": "min", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -1279,7 +1220,6 @@ Blockly.Blocks["operator_constrainnumber"] = { "name": "max", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 100 } } @@ -1337,7 +1277,6 @@ Blockly.Blocks["operator_indexOfTextInText"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "world" } }, @@ -1346,7 +1285,6 @@ Blockly.Blocks["operator_indexOfTextInText"] = { "name": "TEXT2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Hellow world!" } } @@ -1368,7 +1306,6 @@ Blockly.Blocks["operator_lastIndexOfTextInText"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "world" } }, @@ -1377,7 +1314,6 @@ Blockly.Blocks["operator_lastIndexOfTextInText"] = { "name": "TEXT2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "Hellow world!" } } @@ -1399,7 +1335,6 @@ Blockly.Blocks["operator_countAppearTimes"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "a" } }, @@ -1408,7 +1343,6 @@ Blockly.Blocks["operator_countAppearTimes"] = { "name": "TEXT2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "abc abc abc" } } @@ -1430,7 +1364,6 @@ Blockly.Blocks["operator_textIncludesLetterFrom"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "abcdef" } }, @@ -1439,7 +1372,6 @@ Blockly.Blocks["operator_textIncludesLetterFrom"] = { "name": "TEXT2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "fgh" } } @@ -1461,7 +1393,6 @@ Blockly.Blocks["operator_textStartsOrEndsWith"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "abcdef" } }, @@ -1478,7 +1409,6 @@ Blockly.Blocks["operator_textStartsOrEndsWith"] = { "name": "TEXT2", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "abc" } } @@ -1497,11 +1427,9 @@ Blockly.Blocks["operator_toUpperLowerCase"] = { "args0": [ { "type": "input_value", - "name": "text", - "fieldName": "TEXT", + "name": "TEXT", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "ello" } }, @@ -1531,7 +1459,6 @@ Blockly.Blocks["operator_javascript_output"] = { "name": "JS", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } } @@ -1553,7 +1480,6 @@ Blockly.Blocks["operator_javascript_boolean"] = { "name": "JS", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "" } } diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 5c54d51441..4ae182bc9b 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -1151,8 +1151,7 @@ Blockly.Blocks['argument_editor_boolean'] = { "args0": [ { "type": "field_input_removable", - "name": "text", - "fieldName": "TEXT", + "name": "TEXT", "text": "foo" } ], @@ -1172,8 +1171,7 @@ Blockly.Blocks['argument_editor_string_number'] = { "args0": [ { "type": "field_input_removable", - "name": "text", - "fieldName": "TEXT", + "name": "TEXT", "text": "foo" } ], diff --git a/blocks_vertical/sensing.js b/blocks_vertical/sensing.js index 1136053ec7..84a8ec1e4e 100644 --- a/blocks_vertical/sensing.js +++ b/blocks_vertical/sensing.js @@ -262,7 +262,6 @@ Blockly.Blocks['sensing_askandwait'] = { "name": "QUESTION", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "What's your name?" } } @@ -913,10 +912,8 @@ Blockly.Blocks["sensing_regextest"] = { { "type": "input_value", "name": "text", - "fieldName": "TEXT", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo bar" } }, @@ -925,7 +922,6 @@ Blockly.Blocks["sensing_regextest"] = { "name": "reg", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "foo" } }, @@ -934,7 +930,6 @@ Blockly.Blocks["sensing_regextest"] = { "name": "regrule", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "g" } } @@ -956,7 +951,6 @@ Blockly.Blocks["sensing_thing_is_number"] = { "name": "TEXT1", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -978,7 +972,6 @@ Blockly.Blocks["sensing_thing_has_text"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "world" } } @@ -1000,7 +993,6 @@ Blockly.Blocks["sensing_thing_has_number"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "abc 10 def" } } @@ -1034,7 +1026,6 @@ Blockly.Blocks["sensing_thing_is_text"] = { "name": "TEXT1", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "world" } } @@ -1058,7 +1049,6 @@ Blockly.Blocks["sensing_getspritewithattrib"] = { "name": "var", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "my variable" } }, @@ -1067,7 +1057,6 @@ Blockly.Blocks["sensing_getspritewithattrib"] = { "name": "val", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "0" } } @@ -1088,7 +1077,6 @@ Blockly.Blocks['sensing_distanceTo'] = { "name": "x1", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } }, @@ -1097,7 +1085,6 @@ Blockly.Blocks['sensing_distanceTo'] = { "name": "y1", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": -10 } }, @@ -1106,7 +1093,6 @@ Blockly.Blocks['sensing_distanceTo'] = { "name": "x2", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": -10 } }, @@ -1115,7 +1101,6 @@ Blockly.Blocks['sensing_distanceTo'] = { "name": "y2", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -1136,7 +1121,6 @@ Blockly.Blocks['sensing_directionTo'] = { "name": "x2", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": -10 } }, @@ -1145,7 +1129,6 @@ Blockly.Blocks['sensing_directionTo'] = { "name": "y2", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } }, @@ -1154,7 +1137,6 @@ Blockly.Blocks['sensing_directionTo'] = { "name": "x1", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } }, @@ -1163,7 +1145,6 @@ Blockly.Blocks['sensing_directionTo'] = { "name": "y1", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": -10 } } @@ -1182,10 +1163,8 @@ Blockly.Blocks['sensing_isUpperCase'] = { { "type": "input_value", "name": "text", - "fieldName": "TEXT", "defaultBlock": { "type": "text", - "fieldName": "TEXT", "value": "A" } } diff --git a/blocks_vertical/sound.js b/blocks_vertical/sound.js index 29671df948..00d9282665 100644 --- a/blocks_vertical/sound.js +++ b/blocks_vertical/sound.js @@ -171,7 +171,6 @@ Blockly.Blocks['sound_set_stop_fadeout_to'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 1 } }, @@ -210,7 +209,6 @@ Blockly.Blocks['sound_play_at_seconds'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 5 } } @@ -244,7 +242,6 @@ Blockly.Blocks['sound_play_at_seconds_until_done'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 5 } } @@ -319,7 +316,6 @@ Blockly.Blocks['sound_seteffectto'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 100 } } @@ -353,7 +349,6 @@ Blockly.Blocks['sound_changeeffectby'] = { "name": "VALUE", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 10 } } @@ -417,7 +412,6 @@ Blockly.Blocks['sound_changevolumeby'] = { "name": "VOLUME", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": -10 } } @@ -442,7 +436,6 @@ Blockly.Blocks['sound_setvolumeto'] = { "name": "VOLUME", "defaultBlock": { "type": "math_number", - "fieldName": "NUM", "value": 100 } } diff --git a/core/block.js b/core/block.js index dc93d7d412..8eec18c0ed 100644 --- a/core/block.js +++ b/core/block.js @@ -1519,15 +1519,16 @@ Blockly.Block.prototype.appendInput_ = function(type, name, opt_defaultBlock) { if (type == Blockly.INPUT_VALUE || type == Blockly.NEXT_STATEMENT) { connection = this.makeConnection_(type); } + /* if (opt_defaultBlock) { var newBlock = this.workspace.newBlock(opt_defaultBlock.type) newBlock.initSvg() - if (typeof opt_defaultBlock.value !== 'undefined') - try {newBlock.setFieldValue(opt_defaultBlock.value, opt_defaultBlock.fieldName)} catch {} + if (typeof type.value !== 'undefined' && newBlock.inputList[0] && newBlock.inputList[0].fieldRow[0] && newBlock.inputList[0].fieldRow[0].setValue) newBlock.inputList[0].fieldRow[0].setValue(type.value) newBlock.setShadow(true) newBlock.outputConnection.connect(connection) newBlock.render() } +*/ var input = new Blockly.Input(type, name, this, connection); // Append input to list. this.inputList.push(input);