flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ftho...@apache.org
Subject [16/56] [abbrv] git commit: [flex-sdk] [refs/heads/develop] - FLEX-34294: Create a base Class for workers making them debuggable via FDB
Date Thu, 29 May 2014 16:02:58 GMT
FLEX-34294: Create a base Class for workers making them debuggable via FDB


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

Branch: refs/heads/develop
Commit: a5bc488c5ff6d358648e8bcf043c7acf9a43e14e
Parents: 9ced6a8
Author: Fr�d�ric THMOAS <fthomas@apache.org>
Authored: Thu May 1 14:14:17 2014 +0100
Committer: Fr�d�ric THMOAS <fthomas@apache.org>
Committed: Thu May 1 14:14:17 2014 +0100

----------------------------------------------------------------------
 frameworks/projects/core/src/CoreClasses.as     |  1 +
 .../projects/framework/src/FrameworkClasses.as  |  1 +
 .../framework/src/mx/core/DebuggableWorker.as   | 43 ++++++++++++++++++++
 3 files changed, 45 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a5bc488c/frameworks/projects/core/src/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/core/src/CoreClasses.as b/frameworks/projects/core/src/CoreClasses.as
index 77b2d50..89c219b 100644
--- a/frameworks/projects/core/src/CoreClasses.as
+++ b/frameworks/projects/core/src/CoreClasses.as
@@ -35,6 +35,7 @@ internal class CoreClasses
 	import mx.core.BitmapAsset; BitmapAsset;
 	import mx.core.ByteArrayAsset; ByteArrayAsset;
 	import mx.core.ButtonAsset; ButtonAsset;
+    import mx.core.DebuggableWorker; DebuggableWorker;
 	import mx.core.FontAsset; FontAsset;
 	import mx.core.FlexLoader; FlexLoader;
 	import mx.core.IFlexModule; IFlexModule;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a5bc488c/frameworks/projects/framework/src/FrameworkClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/FrameworkClasses.as b/frameworks/projects/framework/src/FrameworkClasses.as
index 45e0ca9..cd6b13c 100644
--- a/frameworks/projects/framework/src/FrameworkClasses.as
+++ b/frameworks/projects/framework/src/FrameworkClasses.as
@@ -68,6 +68,7 @@ internal class FrameworkClasses
 	import mx.core.ContainerGlobals; ContainerGlobals;
 	import mx.core.ContextualClassFactory; ContextualClassFactory;
 	import mx.core.CrossDomainRSLItem; CrossDomainRSLItem;
+    import mx.core.DebuggableWorker; DebuggableWorker;
 	import mx.core.DeferredInstanceFromClass; DeferredInstanceFromClass;
 	import mx.core.DeferredInstanceFromFunction; DeferredInstanceFromFunction;
 	import mx.core.DesignLayer; DesignLayer;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a5bc488c/frameworks/projects/framework/src/mx/core/DebuggableWorker.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/core/DebuggableWorker.as b/frameworks/projects/framework/src/mx/core/DebuggableWorker.as
new file mode 100644
index 0000000..5c78797
--- /dev/null
+++ b/frameworks/projects/framework/src/mx/core/DebuggableWorker.as
@@ -0,0 +1,43 @@
+/**
+ * User: DoubleFx Date: 30/04/2014 Time: 17:34
+ */
+package mx.core {
+import flash.display.Sprite;
+import flash.system.Capabilities;
+import flash.utils.setInterval;
+
+/**
+ *  DebuggableWorker should be used as a base class
+ *  for workers instead of Sprite.
+ *  it allows the debugging of those workers using FDB.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 3.4
+ *  @productversion Flex 4
+ */
+public class DebuggableWorker extends Sprite {
+
+    include "../core/Version.as";
+
+    public function DebuggableWorker() {
+
+        // Stick a timer here so that we will execute script every 1.5s
+        // no matter what.
+        // This is strictly for the debugger to be able to halt.
+        // Note: isDebugger is true only with a Debugger Player.
+        if (Capabilities.isDebugger == true) {
+            setInterval(debugTickler, 1500);
+        }
+    }
+
+    /**
+     *  @private
+     *  This is here so we get the this pointer set to Application.
+     */
+    private function debugTickler():void {
+        // We need some bytes of code in order to have a place to break.
+        var i:int = 0;
+    }
+}
+}


Mime
View raw message