Commit 9024435b authored by ajoa's avatar ajoa Committed by Evan W. Patton

Change ShowListsAsJson default value from false to true


Change-Id: I8dfb4482028f96bfe05937600cb6ab930ff4c0fd
parent d2083ab5
......@@ -27,6 +27,7 @@ $Source $Yail
(set-and-coerce-property! 'Screen1 'PrimaryColor #xFFA5CF47 'number)
(set-and-coerce-property! 'Screen1 'PrimaryColorDark #xFF516623 'number)
(set-and-coerce-property! 'Screen1 'Scrollable #t 'boolean)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Theme "AppTheme.Light.DarkActionBar" 'text)
(set-and-coerce-property! 'Screen1 'Title "MIT App Inventor 2" 'text)
......
......@@ -19,7 +19,7 @@ useslocation=False
androidminsdk=7
actionbar=true
sizing=Responsive
showlistsasjson=False
showlistsasjson=True
theme=AppTheme.Light.DarkActionBar
color.primary=&HFFA5CF47
color.primary.dark=&HFF516623
......
......@@ -997,6 +997,19 @@ public final class YoungAndroidFormUpgrader {
srcCompVersion = 25;
}
if (srcCompVersion < 26) {
// ShowListsAsJson changed from False to True
if (componentProperties.containsKey("ShowListsAsJson")) {
final String value = componentProperties.get("ShowListsAsJson").asString().getString();
if (value.equals("True")) {
componentProperties.remove("ShowListsAsJson");
}
} else {
componentProperties.put("ShowListsAsJson", new ClientJsonString("False"));
}
srcCompVersion = 26;
}
return srcCompVersion;
}
......
......@@ -2281,7 +2281,11 @@ Blockly.Versioning.AllUpgradeMaps =
// For FORM_COMPONENT_VERSION 25:
// - Sizing default value changed from Fixed to Responsive
25: "noUpgrade"
25: "noUpgrade",
// For FORM_COMPONENT_VERISON 26:
// - ShowListsAsJson default value changed from False to True
26: "noUpgrade"
}, // End Screen
......
......@@ -7,5 +7,6 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
)
(init-runtime)
......@@ -9,6 +9,7 @@ $Source $Yail
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "CamcorderTest" 'text)
)
......
......@@ -6,8 +6,9 @@ $Source $Yail
(require <com.google.youngandroid.runtime>)
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "ClockTest" 'text)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "ClockTest" 'text)
)
;;; HorizontalArrangement1
(add-component Screen1 HorizontalArrangement HorizontalArrangement1 )
......
......@@ -9,6 +9,7 @@ $Source $Yail
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "CopyCat" 'text)
)
......
......@@ -9,6 +9,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
......
......@@ -6,6 +6,7 @@ $Source $Yail
(require <com.google.youngandroid.runtime>)
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
;;; Button1
......
......@@ -14,6 +14,7 @@ $Source $Yail
(do-after-form-creation (set-and-coerce-property! 'Screen1 'BackgroundColor #xFFCCCCCC 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "Make-A-Quiz" 'text)
)
......
......@@ -9,6 +9,7 @@ $Source $Yail
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AppName "math" 'text)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
......
......@@ -11,6 +11,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
......
......@@ -8,6 +8,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
......
......@@ -12,6 +12,7 @@ $Source $Yail
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'BackgroundColor #xFF000000 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "PictureCycle" 'text)
)
......
......@@ -9,6 +9,7 @@ $Source $Yail
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "Product Lookup" 'text)
)
......
......@@ -6,8 +6,9 @@ $Source $Yail
(require <com.google.youngandroid.runtime>)
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'AlignHorizontal 3 'number)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'Title "SensorTest" 'text)
(set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "SensorTest" 'text)
)
;;; Label1
(add-component Screen1 Label Label1 (set-and-coerce-property! 'Label1 'FontSize 30 'number)
......
......@@ -9,6 +9,7 @@ $Source $Yail
;;; Screen1
(do-after-form-creation (set-and-coerce-property! 'Screen1 'Sizing "Responsive" 'text)
(set-and-coerce-property! 'Screen1 'ShowListsAsJson #t 'boolean)
(set-and-coerce-property! 'Screen1 'Title "Screen1" 'text)
)
......
......@@ -475,8 +475,10 @@ public class YaVersion {
// - CANVAS_COMPONENT_VERSION was incremented to 12
// For YOUNG_ANDROID_VERSION 192:
// - BALL_COMPONENT_VERSION was incremented to 6
// For YOUNG_ANDROID_VERSION 193:
// - FORM_COMPONENT_VERSION was incremented to 26
public static final int YOUNG_ANDROID_VERSION = 192;
public static final int YOUNG_ANDROID_VERSION = 193;
// ............................... Blocks Language Version Number ...............................
......@@ -822,7 +824,9 @@ public class YaVersion {
// - Added the PermissionGranted event
// For FORM_COMOPONENT_VERSION 25:
// - Sizing default value changed from Fixed to Responsive
public static final int FORM_COMPONENT_VERSION = 25;
// For FORM_COMPONENT_VERSION 26:
// - Updated the default value of ShowListsAsJson from false -> true
public static final int FORM_COMPONENT_VERSION = 26;
// For FUSIONTABLESCONTROL_COMPONENT_VERSION 2:
// - The Fusiontables API was migrated from SQL to V1
......
......@@ -199,7 +199,7 @@ public class Form extends AppInventorCompatActivity
private ScaledFrameLayout scaleLayout;
private static boolean sCompatibilityMode;
private static boolean showListsAsJson = false;
private static boolean showListsAsJson;
private final Set<String> permissions = new HashSet<String>();
......@@ -447,7 +447,7 @@ public class Form extends AppInventorCompatActivity
Title("");
ShowStatusBar(true);
TitleVisible(true);
ShowListsAsJson(false); // Note: Only the Screen1 value is used as this is per-project
ShowListsAsJson(true); // Note: Only the Screen1 value is used as this is per-project
ActionBar(false);
AccentColor(DEFAULT_ACCENT_COLOR);
PrimaryColor(DEFAULT_PRIMARY_COLOR);
......@@ -1738,7 +1738,7 @@ public class Form extends AppInventorCompatActivity
*/
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_BOOLEAN,
defaultValue = "False")
defaultValue = "True", alwaysSend = true)
@SimpleProperty(category = PropertyCategory.APPEARANCE, userVisible = false,
// This description won't appear as a tooltip, since there's no block, but we'll keep it with the source.
description = "If false, lists will be converted to strings using Lisp "
......@@ -1746,13 +1746,11 @@ public class Form extends AppInventorCompatActivity
+ "d). If true, lists will appear as in Json or Python, e.g. [\"a\", 1, "
+ "\"b\", 2, [\"c\", \"d\"]]. This property appears only in Screen 1, "
+ "and the value for Screen 1 determines the behavior for all "
+ "screens. The property defaults to \"false\" meaning that the App "
+ "Inventor programmer must explicitly set it to \"true\" if JSON/Python "
+ "syntax is desired. At some point in the future we will alter the "
+ "system so that new projects are created with this property set to "
+ "\"true\" by default. Existing projects will not be impacted. The App "
+ "Inventor programmer can also set it back to \"false\" in newer "
+ "projects if desired. "
+ "screens. The property defaults to \"true\" meaning that the App "
+ "Inventor programmer must explicitly set it to \"false\" if Lisp "
+ "syntax is desired. In older versions of App Inventor, this setting "
+ "defaulted to false. Older projects should not have been affected by "
+ "this default settings update."
)
public void ShowListsAsJson(boolean asJson) {
showListsAsJson = asJson;
......
......@@ -1015,13 +1015,11 @@ none
i.e., as symbols separated by spaces, e.g., (a 1 b2 (c d)). If true,
lists will appear as in Json or Python, e.g. ["a", 1, "b", 2, ["c",
"d"]]. This property appears only in Screen 1, and the value for
Screen 1 determines the behavior for all screens. The property
defaults to "false" meaning that the App Inventor programmer must
explicitly set it to “true” if JSON/Python syntax is desired. At some
point in the future we will alter the system so that new projects are
created with this property set to "true" by default. Existing projects
will not be impacted. The App Inventor programmer can also set it back
to "false" in newer projects if desired.
Screen 1 determines the behavior for all screens. The property defaults to true
meaning that the App Inventor programmer must explicitly set it to false
if Lisp syntax is desired. In older versions of App Inventor, this setting
defaulted to false. Older projects should not have been affected by
this default settings update.
</dd>
<dt><code><em>ShowStatusBar</em></code></dt>
<dd>The status bar is the topmost bar on the screen. This property reports whether the status bar is visible.</dd>
......
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