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
acabffcf
Unverified
Commit
acabffcf
authored
Mar 31, 2020
by
Evan W. Patton
Committed by
GitHub
Mar 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show text validation errors if not in multiselect mode (#2133)
Change-Id: Iadbfae002175a409b928f5c7e705c85cdb70566d
parent
36139183
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/YaFormEditor.java
.../appinventor/client/editor/youngandroid/YaFormEditor.java
+1
-0
appinventor/appengine/src/com/google/appinventor/client/widgets/properties/PropertyEditor.java
...appinventor/client/widgets/properties/PropertyEditor.java
+10
-0
appinventor/appengine/src/com/google/appinventor/client/widgets/properties/TextPropertyEditorBase.java
...tor/client/widgets/properties/TextPropertyEditorBase.java
+6
-4
No files found.
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/YaFormEditor.java
View file @
acabffcf
...
...
@@ -763,6 +763,7 @@ public final class YaFormEditor extends SimpleEditor implements FormChangeListen
break
;
}
}
newProperties
.
getProperty
(
name
).
getEditor
().
setMultiselectMode
(
true
);
newProperties
.
getProperty
(
name
).
setValue
(
sharedValue
);
}
selectedProperties
=
newProperties
;
...
...
appinventor/appengine/src/com/google/appinventor/client/widgets/properties/PropertyEditor.java
View file @
acabffcf
...
...
@@ -14,6 +14,8 @@ import com.google.gwt.user.client.ui.Composite;
*/
public
abstract
class
PropertyEditor
extends
Composite
{
private
boolean
multiselectMode
=
false
;
/**
* Property being edited by this editor.
*/
...
...
@@ -46,4 +48,12 @@ public abstract class PropertyEditor extends Composite {
public
void
refresh
()
{
this
.
updateValue
();
}
public
void
setMultiselectMode
(
boolean
multiselect
)
{
multiselectMode
=
true
;
}
public
boolean
inMultiselectMode
()
{
return
multiselectMode
;
}
}
appinventor/appengine/src/com/google/appinventor/client/widgets/properties/TextPropertyEditorBase.java
View file @
acabffcf
...
...
@@ -152,11 +152,13 @@ public class TextPropertyEditorBase extends PropertyEditor {
validate
(
text
);
property
.
setValue
(
text
);
}
catch
(
InvalidTextException
e
)
{
String
error
=
e
.
getMessage
();
if
(
error
==
null
||
error
.
isEmpty
())
{
error
=
MESSAGES
.
malformedInputError
();
if
(!
inMultiselectMode
())
{
String
error
=
e
.
getMessage
();
if
(
error
==
null
||
error
.
isEmpty
())
{
error
=
MESSAGES
.
malformedInputError
();
}
Window
.
alert
(
error
);
}
Window
.
alert
(
error
);
updateValue
();
// Restore previous property value.
}
}
...
...
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