This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new b3c63f5 Fix for currentState bindings not working. It is either this
fix, or "event.propertyName = 'currentState'" at all the currentState setter
dispatch sites. This seems least code approach.
b3c63f5 is described below
commit b3c63f50c535b04cdf6435665195d372d596483f
Author: greg-dove <[email protected]>
AuthorDate: Tue Feb 18 19:30:46 2020 +1300
Fix for currentState bindings not working.
It is either this fix, or "event.propertyName = 'currentState'" at all the
currentState setter dispatch sites. This seems least code approach.
---
.../royale/org/apache/royale/binding/PropertyWatcher.as | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git
a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/PropertyWatcher.as
b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/PropertyWatcher.as
index ce83062..4ef3b03 100644
---
a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/PropertyWatcher.as
+++
b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/PropertyWatcher.as
@@ -151,11 +151,14 @@ package org.apache.royale.binding
protected function changeHandler(event:Event):void
{
if (event is ValueChangeEvent)
- {
- var propName:String = ValueChangeEvent(event).propertyName;
-
- if (propName != propertyName)
- return;
+ { //normally it is 'generic' ValueChangeEvent.VALUE_CHANGE, but
it can be other types, eg. "currentStateChange", so check here:
+ if (event.type == ValueChangeEvent.VALUE_CHANGE) {
+ var propName:String = ValueChangeEvent(event).propertyName;
+
+ if (propName != propertyName)
+ return;
+ }
+ //@todo investigate possible optimization here. We can assume
we already know the new Value and old Value via the event.
}
wrapUpdate(updateProperty);