Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
9024435b
Commit
9024435b
authored
Sep 29, 2019
by
ajoa
Committed by
Evan W. Patton
Sep 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change ShowListsAsJson default value from false to true
Change-Id: I8dfb4482028f96bfe05937600cb6ab930ff4c0fd
parent
d2083ab5
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
57 additions
and
25 deletions
+57
-25
appinventor/aiplayapp/src/edu/mit/appinventor/aicompanion3/Screen1.yail
...playapp/src/edu/mit/appinventor/aicompanion3/Screen1.yail
+1
-0
appinventor/aiplayapp/youngandroidproject/project.properties
appinventor/aiplayapp/youngandroidproject/project.properties
+1
-1
appinventor/appengine/src/com/google/appinventor/client/youngandroid/YoungAndroidFormUpgrader.java
...nventor/client/youngandroid/YoungAndroidFormUpgrader.java
+13
-0
appinventor/blocklyeditor/src/versioning.js
appinventor/blocklyeditor/src/versioning.js
+5
-1
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/backgroundColor/backgroundColorExpected.yail
...yeditor/data/backgroundColor/backgroundColorExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/camcorder/camcorderExpected.yail
...entor/blocklyeditor/data/camcorder/camcorderExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/clock/clockExpected.yail
...e/appinventor/blocklyeditor/data/clock/clockExpected.yail
+3
-2
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/copyCat/copyCatExpected.yail
...pinventor/blocklyeditor/data/copyCat/copyCatExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/factorial/factorialExpected.yail
...entor/blocklyeditor/data/factorial/factorialExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/helloPurr/helloPurrExpected.yail
...entor/blocklyeditor/data/helloPurr/helloPurrExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/makeQuiz/makeQuizExpected.yail
...nventor/blocklyeditor/data/makeQuiz/makeQuizExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/mathsconvert/mathsconvertExpected.yail
...blocklyeditor/data/mathsconvert/mathsconvertExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/moleMash/MoleMashExpected.yail
...nventor/blocklyeditor/data/moleMash/MoleMashExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/paintPot/PaintPotExpected.yail
...nventor/blocklyeditor/data/paintPot/PaintPotExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/pictureCycle/pictureCycleExpected.yail
...blocklyeditor/data/pictureCycle/pictureCycleExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/productLookup/productLookupExpected.yail
...ocklyeditor/data/productLookup/productLookupExpected.yail
+1
-0
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/sensor/sensorExpected.yail
...appinventor/blocklyeditor/data/sensor/sensorExpected.yail
+3
-2
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/underscore/underscoreExpected.yail
...tor/blocklyeditor/data/underscore/underscoreExpected.yail
+1
-0
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
...c/com/google/appinventor/components/common/YaVersion.java
+6
-2
appinventor/components/src/com/google/appinventor/components/runtime/Form.java
...s/src/com/google/appinventor/components/runtime/Form.java
+8
-10
appinventor/docs/reference/components/userinterface.html
appinventor/docs/reference/components/userinterface.html
+5
-7
No files found.
appinventor/aiplayapp/src/edu/mit/appinventor/aicompanion3/Screen1.yail
View file @
9024435b
...
...
@@ -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)
...
...
appinventor/aiplayapp/youngandroidproject/project.properties
View file @
9024435b
...
...
@@ -19,7 +19,7 @@ useslocation=False
androidminsdk
=
7
actionbar
=
true
sizing
=
Responsive
showlistsasjson
=
Fals
e
showlistsasjson
=
Tru
e
theme
=
AppTheme.Light.DarkActionBar
color.primary
=
&HFFA5CF47
color.primary.dark
=
&HFF516623
...
...
appinventor/appengine/src/com/google/appinventor/client/youngandroid/YoungAndroidFormUpgrader.java
View file @
9024435b
...
...
@@ -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
;
}
...
...
appinventor/blocklyeditor/src/versioning.js
View file @
9024435b
...
...
@@ -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
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/backgroundColor/backgroundColorExpected.yail
View file @
9024435b
...
...
@@ -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)
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/camcorder/camcorderExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/clock/clockExpected.yail
View file @
9024435b
...
...
@@ -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 )
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/copyCat/copyCatExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/factorial/factorialExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/helloPurr/helloPurrExpected.yail
View file @
9024435b
...
...
@@ -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
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/makeQuiz/makeQuizExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/mathsconvert/mathsconvertExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/moleMash/MoleMashExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/paintPot/PaintPotExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/pictureCycle/pictureCycleExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/productLookup/productLookupExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/sensor/sensorExpected.yail
View file @
9024435b
...
...
@@ -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)
...
...
appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/data/underscore/underscoreExpected.yail
View file @
9024435b
...
...
@@ -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)
)
...
...
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
View file @
9024435b
...
...
@@ -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
=
19
2
;
public
static
final
int
YOUNG_ANDROID_VERSION
=
19
3
;
// ............................... 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
...
...
appinventor/components/src/com/google/appinventor/components/runtime/Form.java
View file @
9024435b
...
...
@@ -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
(
fals
e
);
// Note: Only the Screen1 value is used as this is per-project
ShowListsAsJson
(
tru
e
);
// 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
;
...
...
appinventor/docs/reference/components/userinterface.html
View file @
9024435b
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment