You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/12/09 06:17:03 UTC

[06/10] git commit: [flex-falcon] [refs/heads/develop] - update test

update test


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/bfb8e0bb
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/bfb8e0bb
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/bfb8e0bb

Branch: refs/heads/develop
Commit: bfb8e0bbace3d5032165b96f2b3db1c478cf9a34
Parents: 15f6607
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:24:16 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:02 2014 -0800

----------------------------------------------------------------------
 .../flexjs/files/FlexJSTest_again_result.js     |  8 ++++--
 .../flexjs/files/MyInitialView_result.js        | 28 +++++++++++++++-----
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  |  7 +++--
 3 files changed, 30 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bfb8e0bb/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
index 75fffd5..7355661 100644
--- a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
@@ -162,8 +162,10 @@ FlexJSTest_again.prototype.get_service = function()
  */
 FlexJSTest_again.prototype.set_service = function(value)
 {
-  if (value != this.service)
+  if (value != this.service) {
     this.service = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'service', null, value));
+  }
 };
 
 
@@ -183,8 +185,10 @@ FlexJSTest_again.prototype.get_collection = function()
  */
 FlexJSTest_again.prototype.set_collection = function(value)
 {
-  if (value != this.collection)
+  if (value != this.collection) {
     this.collection = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'collection', null, value));
+  }
 };
 
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bfb8e0bb/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
index 5ce13fb..f609b5d 100644
--- a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
@@ -358,8 +358,10 @@ MyInitialView.prototype.get_lbl = function()
  */
 MyInitialView.prototype.set_lbl = function(value)
 {
-  if (value != this.lbl)
+  if (value != this.lbl) {
     this.lbl = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'lbl', null, value));
+  }
 };
 
 
@@ -379,8 +381,10 @@ MyInitialView.prototype.get_timerLabel = function()
  */
 MyInitialView.prototype.set_timerLabel = function(value)
 {
-  if (value != this.timerLabel)
+  if (value != this.timerLabel) {
     this.timerLabel = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'timerLabel', null, value));
+  }
 };
 
 
@@ -400,8 +404,10 @@ MyInitialView.prototype.get_cityList = function()
  */
 MyInitialView.prototype.set_cityList = function(value)
 {
-  if (value != this.cityList)
+  if (value != this.cityList) {
     this.cityList = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'cityList', null, value));
+  }
 };
 
 
@@ -421,8 +427,10 @@ MyInitialView.prototype.get_input = function()
  */
 MyInitialView.prototype.set_input = function(value)
 {
-  if (value != this.input)
+  if (value != this.input) {
     this.input = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'input', null, value));
+  }
 };
 
 
@@ -442,8 +450,10 @@ MyInitialView.prototype.get_checkbox = function()
  */
 MyInitialView.prototype.set_checkbox = function(value)
 {
-  if (value != this.checkbox)
+  if (value != this.checkbox) {
     this.checkbox = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'checkbox', null, value));
+  }
 };
 
 
@@ -463,8 +473,10 @@ MyInitialView.prototype.get_list = function()
  */
 MyInitialView.prototype.set_list = function(value)
 {
-  if (value != this.list)
+  if (value != this.list) {
     this.list = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'list', null, value));
+  }
 };
 
 
@@ -484,8 +496,10 @@ MyInitialView.prototype.get_comboBox = function()
  */
 MyInitialView.prototype.set_comboBox = function(value)
 {
-  if (value != this.comboBox)
+  if (value != this.comboBox) {
     this.comboBox = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'comboBox', null, value));
+  }
 };
 
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bfb8e0bb/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 8ae9eaa..5cf3a17 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -44,7 +44,6 @@ import org.apache.flex.compiler.internal.codegen.databinding.StaticPropertyWatch
 import org.apache.flex.compiler.internal.codegen.databinding.WatcherInfoBase;
 import org.apache.flex.compiler.internal.codegen.databinding.WatcherInfoBase.WatcherType;
 import org.apache.flex.compiler.internal.codegen.databinding.XMLWatcherInfo;
-import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
@@ -848,11 +847,11 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
                 writeNewline("{");
                 indentPush();
                 writeNewline("if (value != this." + instance.id + ") {");
-                indentPop();
-                indentPop();
                 writeNewline("this." + instance.id + " = value;");
                 write("this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, '");
-                write(instance.id + "', null, value));");
+                indentPop();
+                writeNewline(instance.id + "', null, value));");
+                indentPop();
                 writeNewline("}");
                 writeNewline("};");
                 writeNewline();