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 2013/04/03 06:48:53 UTC

[1/2] git commit: fix event handling for FalconJX output

Updated Branches:
  refs/heads/develop 355fdd698 -> 2ecfb7b39


fix event handling for FalconJX output


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

Branch: refs/heads/develop
Commit: 2ecfb7b39ddddd4313157712eb3e901707d17672
Parents: 51ddf0c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Apr 2 21:24:52 2013 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Apr 2 21:25:12 2013 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/core/HTMLElementWrapper.js |    9 +++++++-
 .../src/org/apache/flex/events/CustomEvent.js      |   14 +++++++-----
 .../js/FlexJS/src/org/apache/flex/events/Event.js  |   17 ++++++++------
 3 files changed, 26 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2ecfb7b3/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
index ed123dc..95157d8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -55,7 +55,14 @@ org.apache.flex.core.HTMLElementWrapper.prototype.addEventListener =
 org.apache.flex.core.HTMLElementWrapper.prototype.dispatchEvent = 
     function(evt) {
     if (this.element.addEventListener)
-        this.element.dispatchEvent(evt);    
+    {
+        try {
+            this.element.dispatchEvent(evt);
+        } catch (e) {
+            var domevt = this.createEvent(evt.type);
+            this.element.dispatchEvent(domevt);
+        }
+    }
     else if (this.element.attachEvent || !this.element.dispatchEvent)
         org.apache.flex.utils.IE8Utils.dispatchEvent(this, this.element, evt)
 };

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2ecfb7b3/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js b/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
index 97c64e2..a218459 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/CustomEvent.js
@@ -17,12 +17,8 @@ goog.provide('org.apache.flex.events.CustomEvent');
 /**
  * @constructor
  */
-org.apache.flex.events.CustomEvent = function() {
-    /**
-     * @private
-     * @type {string}
-     */
-     this.type_;
+org.apache.flex.events.CustomEvent = function(type) {
+    this.type = type;
 };
 
 /**
@@ -32,3 +28,9 @@ org.apache.flex.events.CustomEvent = function() {
 org.apache.flex.events.CustomEvent.prototype.init = function(type) {
     this.type_ = type;
 };
+
+/**
+ * @expose 
+ * @type {string} type The event type.
+ */
+org.apache.flex.events.CustomEvent.prototype.type;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2ecfb7b3/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js b/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
index 9b824bc..3c0e20c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/Event.js
@@ -17,12 +17,8 @@ goog.provide('org.apache.flex.events.Event');
 /**
  * @constructor
  */
-org.apache.flex.events.Event = function() {
-    /**
-     * @private
-     * @type {string}
-     */
-     this.type_;
+org.apache.flex.events.Event = function(type) {
+    this.type = type;
 };
 
 /**
@@ -30,5 +26,12 @@ org.apache.flex.events.Event = function() {
  * @param {string} type The event type.
  */
 org.apache.flex.events.Event.prototype.init = function(type) {
-    this.type_ = type;
+    this.type = type;
 };
+
+/**
+ * @expose 
+ * @type {string} type The event type.
+ */
+org.apache.flex.events.Event.prototype.type;
+


[2/2] git commit: Add addToParent to Button

Posted by ah...@apache.org.
Add addToParent to Button


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

Branch: refs/heads/develop
Commit: 51ddf0c1b43bcbaa9d2e1f00fc5e8f7a26841b18
Parents: 355fdd6
Author: Alex Harui <ah...@apache.org>
Authored: Tue Apr 2 21:24:05 2013 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Apr 2 21:25:12 2013 -0700

----------------------------------------------------------------------
 .../org/apache/flex/html/staticControls/Button.as  |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51ddf0c1/frameworks/as/src/org/apache/flex/html/staticControls/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Button.as b/frameworks/as/src/org/apache/flex/html/staticControls/Button.as
index 04729c8..1077526 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Button.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Button.as
@@ -19,6 +19,7 @@
 package org.apache.flex.html.staticControls
 {
 	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
 	import flash.display.SimpleButton;
 	import flash.events.MouseEvent;
 	
@@ -157,5 +158,10 @@ package org.apache.flex.html.staticControls
 			_width = $width;
 			_height = $height;
 		}
+		
+		public function addToParent(p:DisplayObjectContainer):void
+		{
+			p.addChild(this);
+		}
 	}
 }
\ No newline at end of file