Added event priority to uncaught handler

--- FlexUnit4/src/org/flexunit/runner/FlexUnitCore.as
+++ FlexUnit4/src/org/flexunit/runner/FlexUnitCore.as
@@ -1,6 +1,6 @@
 /**
  * Copyright (c) 2009 Digital Primates IT Consulting Group
- *
+ *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
  * files (the "Software"), to deal in the Software without
@@ -9,10 +9,10 @@
  * copies of the Software, and to permit persons to whom the
  * Software is furnished to do so, subject to the following
  * conditions:
- *
+ *
  * The above copyright notice and this permission notice shall be
  * included in all copies or substantial portions of the Software.
- *
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -21,430 +21,435 @@
  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
- *
- * @author     Michael Labriola
- * @version
- **/
+ *
+ * @author     Michael Labriola
+ * @version
+ **/
 package org.flexunit.runner {
-	import flash.display.DisplayObjectContainer;
-	import flash.display.LoaderInfo;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.events.IEventDispatcher;
-	import flash.utils.*;
-
-	import org.flexunit.IncludeFlexClasses;
-	import org.flexunit.events.UnknownError;
-	import org.flexunit.experimental.theories.Theories;
-	import org.flexunit.internals.dependency.ExternalRunnerDependencyWatcher;
-	import org.flexunit.runner.external.IExternalDependencyRunner;
-	import org.flexunit.runner.notification.Failure;
-	import org.flexunit.runner.notification.IAsyncStartupRunListener;
-	import org.flexunit.runner.notification.IRunListener;
-	import org.flexunit.runner.notification.IRunNotifier;
-	import org.flexunit.runner.notification.RunListener;
-	import org.flexunit.runner.notification.RunNotifier;
-	import org.flexunit.runner.notification.async.AsyncListenerWatcher;
-	import org.flexunit.runners.Parameterized;
-	import org.flexunit.token.AsyncCoreStartupToken;
-	import org.flexunit.token.AsyncTestToken;
-	import org.flexunit.token.ChildResult;
-	import org.flexunit.utils.ClassNameUtil;
-	import org.fluint.uiImpersonation.VisualTestEnvironmentBuilder;
-
-	[Event(type="testsComplete", type="flash.events.Event")]
-	[Event(type="runnerStart", type="flash.events.Event")]
-	[Event(type="testsStopped", type="flash.events.Event")]
-
-	/**
-	 * FlexUnit4 Version: 4.1.00

-	 *
-	 * The FlexUnitCore is responsible for executing objects that implement an IRequest
-	 * interface.  There are several ways that the IRequest can be provided to the
-	 * FlexUnitCore.  If you pass FlexUnit4’s core anything other than an IRequest, the
-	 * core uses these methods to generate a Request object before processing continues.

-	 *
-	 * Ways that an IRequest can be provided to the FlexUnitCore are as follows:
-	 *

-	 *
 A group of arguments of arguments can be provided to the #run method which will
-	 * eventaully create an IRequest.

-	 *
 A group of classes consisting of suites and test cases to run can be provided to the
-	 * #runClasses()  method to generate an IRequest.

-	 *
 An IRequest can be passed directly to the #runRequest() method.
-	 * IRequests can be generated by calling static methods that create IRequests
-	 * in the Request class.

-	 *

-	 *

-	 * Ultimately, FlexUnit4 runs one and only one request per run. So, if you pass it multiple classes, etc.
-	 * these are all wrapped in a single Request before execution begins.  Once the
-	 * IRequest has been provided to the FlexUnitCore, the test run will begin
-	 * once all IRunListener are ready.
-	 *

-	 * In order to add an IRunListener to the test run, the #addListener() method must
-	 * called.  If one wishes to remove a listener from the test run, the #removeListener() method
-	 * needs to be called with IRunListener to remove.
-	 *

-	 * Once the test run has finished execution, a Result will be obtained and the IRunListeners
-	 * will be notified of the results of the test run.
-	 *
-	 * @see org.flexunit.runner.Request
-	 * @see org.flexunit.runner.Result
-	 * @see org.flexunit.runner.notification.IRunListener
-	 */
-
-	public class FlexUnitCore extends EventDispatcher {
-		// We have a toggle in the compiler arguments so that we can choose whether or not the flex classes should
-		// be compiled into the FlexUnit swc.  For actionscript only projects we do not want to compile the
-		// flex classes since it will cause errors.
-		CONFIG::useFlexClasses {
-			// This class imports all Flex classes.
-			/**
-			 * @private
-			 */
-			private var t1:IncludeFlexClasses;
-		}
-
-		/**
-		 * @private
-		 */
-		private var notifier:IRunNotifier;
-
-
-		private var runnerExternalDependencyWatcher:ExternalRunnerDependencyWatcher;
-
-		/**
-		 * @private
-		 */
-		private var asyncListenerWatcher:AsyncListenerWatcher;
-
-		/**
-		 * @private
-		 */
-		private var _visualDisplayRoot:DisplayObjectContainer;
-
-		/**
-		 * @private
-		 */
-		private var topLevelRunner:IRunner;
-		/**
-		 * @private
-		 */
-		private var runListener:RunListener;
-		/**
-		 * @private
-		 */
-		private static const RUN_LISTENER:String = "runListener";
-		public static const TESTS_COMPLETE : String = "testsComplete";
-		public static const TESTS_STOPPED : String = "testsStopped";
-		public static const RUNNER_START : String = "runnerStart";
-		public static const RUNNER_COMPLETE : String = "runnerComplete";
-
-		//Just keep theories linked in until we decide how to deal with it
-		/**
-		 * @private
-		 */
-		private var theory:Theories;
-		/**
-		 * @private
-		 */
-		private var params:Parameterized;
-
-		/**
-		 * Returns the version number.
-		 */
-		public static function get version():String {
-			return "4.1.0.0rc2";
-		}
-
-
-		public function get visualDisplayRoot():DisplayObjectContainer {
-			return _visualDisplayRoot;
-		}
-
-		public function set visualDisplayRoot( value:DisplayObjectContainer ):void {
-			_visualDisplayRoot = value;
-
-			//pass the stage along to the VisualEnvironmentBuilder..
-			VisualTestEnvironmentBuilder.getInstance( value );
-		}
-
-		/**
-		 * Requests that the FlexUnitCore stop execution of the test environment.
-		 * As Flash Player is single threaded, we will only be able to stop execution after the currently running test completes
-		 * and before the next one begins, so this will always have a margin of error.
-		 */
-		public function pleaseStop():void {
-
-			if ( topLevelRunner ) {
-				topLevelRunner.pleaseStop();
-			}
-
-			//dispatchEvent( new Event( TESTS_STOPPED ) );
-		}
-
-		private function dealWithArgArray( ar:Array, foundClasses:Array, missingClasses:Array ):void {
-			for ( var i:int=0; i<ar.length; i++ ) {
-				try {
-					if ( ar[ i ] is String ) {
-						foundClasses.push( getDefinitionByName( ar[ i ] ) );
-					} else if ( ar[ i ] is Array ) {
-						dealWithArgArray( ar[ i ] as Array, foundClasses, missingClasses );
-					} else if ( ar[ i ] is IRequest ) {
-						foundClasses.push( ar[ i ] );
-					} else if ( ar[ i ] is Class ) {
-						foundClasses.push( ar[ i ] );
-					} else if ( ar[ i ] is Object ) {
-						//this is actually likely an instance.
-						//eventually we intend to have more evolved support for
-						//this, but, for right now, just try to make it a class
-						var className:String = getQualifiedClassName( ar[ i ] );
-						var definition:* = getDefinitionByName( className );
-						foundClasses.push( definition );
-					}
-				}
-				catch ( error:Error ) {
-					//logger.error( "Cannot find class {0}", ar[i] );
-					var desc:IDescription = Description.createSuiteDescription( ar[ i ] );
-					var failure:Failure = new Failure( desc, error );
-					missingClasses.push( failure );
-				}
-			}
-		}
-
-		/**
-		 * Determines what classes can be found in the provided args.  If any classes
-		 * have been reported but are missing, those classes will be reported as failures in the returned
-		 * Result.  The classes that are found in the arguments will be wrapped into a
-		 * Request, and that Request will be used for the test run.
-		 *
-		 * @param args The arguments are provided for the test run.
-		 * @return void.
-		 */
-		public function run( ...args ):void {
-			var foundClasses:Array = new Array();
-			//Unlike JUnit, missing classes is probably unlikely here, but lets preserve the metaphor
-			//just in case
-			var missingClasses:Array = new Array();
-
-			dealWithArgArray( args, foundClasses, missingClasses );
-
-			runClasses.apply( this, foundClasses );
-
-			//This is kind of fake
-			//Need to tie this to the remaining result set
-			var result:Result = new Result();
-			for ( var i:int=0; i<missingClasses.length; i++ ) {
-				result.failures.push( missingClasses[ i ] );
-			}
-		}
-
-		/**
-		 * Wraps the class arguments contained in args into a Request.
-		 * The classes that are found in the arguments will be wrapped into a
-		 * Request, and that Request will be used for the test run.
-		 *
-		 * @param args The class arguments that are provided for the test run.
-		 */
-		public function runClasses( ...args ):void {
-			//This is just an optimization for the case where we are passed an IRequest
-			//Otherwise it goes through the trouble of re-wrapping it in a suite.
-			//When that happens we end up with potential sorting and filtering issues
-			if ( args && ( args.length == 1 ) && args[ 0 ] is IRequest ) {
-				runRequest( args[ 0 ] );
-			} else {
-				runRequest( Request.classes.apply( this, args ) );
-			}
-		}
-
-		/**
-		 * Runs the classes contained in the Request using the IRunner of
-		 * the Request.  Feedback will be written while the tests
-		 * are running and stack traces writes will be made for all failed tests after all tests
-		 * complete.
-		 *
-		 * @param request The Request describing the IRunner to use for
-		 * for the test run.
-		 */
-		public function runRequest( request:Request ):void {
-			runRunner( request.iRunner )
-		}
-
-		/**
-		 * Runs the tests contained in IRunner if all IAsyncStartupRunListerners
-		 * are ready; otherwise, the the test run will begin once all listeners have reported that they
-		 * are ready.

-		 *
-		 * Once the test run begins, feedback will be written while the tests are running and stack traces
-		 * writes will be made for all failed tests after all tests complete.
-		 *
-		 * @param runner The IRunner to use for this test run.
-		 */
-		public function runRunner( runner:IRunner ):void {
-
-			//Record the top level runner. This is the active runner in case we need to
-			//do something like stop the execution of the test run
-			topLevelRunner = runner;
-
-			if ( runner is IExternalDependencyRunner ) {
-				( runner as IExternalDependencyRunner ).dependencyWatcher = runnerExternalDependencyWatcher;
-			}
-
-			if ( runnerExternalDependencyWatcher.allDependenciesResolved && asyncListenerWatcher.allListenersReady ) {
-				beginRunnerExecution( runner );
-			} else {
-				if ( !asyncListenerWatcher.allListenersReady ) {
-					//we need to wait until all listeners are ready (or failed) before we can continue
-					var tokenListeners:AsyncCoreStartupToken = asyncListenerWatcher.startUpToken;
-					tokenListeners.runner = runner;
-					tokenListeners.addNotificationMethod( verifyRunnerCanBegin );
-				}
-
-				if ( !runnerExternalDependencyWatcher.allDependenciesResolved ) {
-					var tokenRunners:AsyncCoreStartupToken = runnerExternalDependencyWatcher.token;
-					tokenRunners.runner = runner;
-					tokenRunners.addNotificationMethod( verifyRunnerCanBegin );
-				}
-			}
-		}
-
-		protected function verifyRunnerCanBegin( runner:IRunner ):void {
-			if ( runnerExternalDependencyWatcher.allDependenciesResolved && asyncListenerWatcher.allListenersReady ) {
-				beginRunnerExecution( runner );
-			}
-		}
-		/**
-		 * Starts the execution of the IRunner.
-		 */
-		protected function beginRunnerExecution( runner:IRunner ):void {
-			var result:Result = new Result();
-			runListener = result.createListener();
-			addFirstListener( runListener );
-
-			var token:AsyncTestToken = new AsyncTestToken( ClassNameUtil.getLoggerFriendlyClassName( this ) );
-			token.addNotificationMethod( handleRunnerComplete );
-			token[ RUN_LISTENER ] = runListener;
-
-			dispatchEvent( new Event( RUNNER_START ) );
-
-			try {
-				notifier.fireTestRunStarted( runner.description );
-				runner.run( notifier, token );
-			}
-
-			catch ( error:Error ) {
-				//I think we need to further restrict the case where this is true
-				notifier.fireTestAssumptionFailed( new Failure( runner.description, error ) );
-
-				finishRun( runListener );
-			}
-		}
-
-		/**
-		 * All tests have finished execution.
-		 */
-		private function handleRunnerComplete( result:ChildResult ):void {
-			var tokenRunListener:RunListener = result.token[ RUN_LISTENER ];
-
-			//Cleanup the top level runner
-			topLevelRunner = null;
-
-			//Cleanup up runListener reference
-			runListener = null;
-
-			finishRun( tokenRunListener );
-		}
-
-		/**
-		 * Notifies that the runListener that the test run has finished.
-		 *
-		 * @param runListener The listern to notify about the test run finishing.
-		 */
-		private function finishRun( runListener:RunListener ):void {
-			notifier.fireTestRunFinished( runListener.result );
-			removeListener( runListener );
-
-			//Consider making this a custom event and attaching the result set
-			dispatchEvent( new Event( TESTS_COMPLETE ) );
-		}
-
-		/**
-		 * Adds a generic listener for errors. In practice this is used to catch global
-		 * errors to ensure that, if a developer does not properly code an async test
-		 * using FlexUnit APIs, that the player is not stopped by a message dialog
-		 * Receiving this top level error is *very* bad and causes an immediate stop.
-		 *
-		 * @param listener the listener to add
-		 * @see org.flexunit.runner.notification.RunListener
-		 */
-		public function addUncaughtErrorListener( loaderInfo:LoaderInfo ):void {
-			//dereferencing this anonymously so we don't have problems with other
-			//FP versions
-
-			if(loaderInfo.hasOwnProperty("uncaughtErrorEvents"))
-				IEventDispatcher(loaderInfo["uncaughtErrorEvents"]).addEventListener("uncaughtError", uncaughtErrorHandler);
-		}
-
-		private function uncaughtErrorHandler( event:Event ):void {
-			//We received a top level error here... this is most likely because
-			//someone screwed up an async call, however, even in that case
-			//we have limited ways to figure out why. we need to stop all
-			//of the tests immediately.
-			event.preventDefault();
-
-			var unknownError:UnknownError = new UnknownError( event );
-			var description:IDescription = Description.createTestDescription( UnknownError, "Uncaught Top Level Exception" );
-			var failure:Failure = new Failure( description, unknownError );
-
-			notifier.fireTestFailure( failure );
-			notifier.fireTestRunFinished( runListener.result );
-
-			//Kill all listeners so they get no further events
-			notifier.removeAllListeners();
-
-			//Issue the pleaseStop to make the runners stop execution
-			pleaseStop();
-		}
-
-		/**
-		 * Add a listener to be notified as the tests run.
-		 * @param listener the listener to add
-		 * @see org.flexunit.runner.notification.RunListener
-		 */
-		public function addListener( listener:IRunListener ):void {
-			notifier.addListener( listener );
-			if ( listener is IAsyncStartupRunListener ) {
-				asyncListenerWatcher.watchListener( listener as IAsyncStartupRunListener );
-			}
-		}
-
-		private function addFirstListener( listener:IRunListener ):void {
-			notifier.addFirstListener( listener );
-			if ( listener is IAsyncStartupRunListener ) {
-				asyncListenerWatcher.watchListener( listener as IAsyncStartupRunListener );
-			}
-		}
-
-		/**
-		 * Remove a listener.
-		 * @param listener the listener to remove
-		 */
-		public function removeListener( listener:IRunListener ):void {
-			notifier.removeListener( listener );
-
-			if ( listener is IAsyncStartupRunListener ) {
-				asyncListenerWatcher.unwatchListener( listener as IAsyncStartupRunListener );
-			}
-		}
-
-		/**
-		 * Create a new FlexUnitCore to run tests.
-		 */
-		public function FlexUnitCore() {
-			notifier = new RunNotifier();
-
-			runnerExternalDependencyWatcher = new ExternalRunnerDependencyWatcher();
-
-			asyncListenerWatcher = new AsyncListenerWatcher( notifier, null );
-		}
-	}
+
+    import flash.display.DisplayObjectContainer;
+    import flash.display.LoaderInfo;
+    import flash.events.Event;
+    import flash.events.EventDispatcher;
+    import flash.events.IEventDispatcher;
+    import flash.utils.*;
+
+    import org.flexunit.IncludeFlexClasses;
+    import org.flexunit.events.UnknownError;
+    import org.flexunit.experimental.theories.Theories;
+    import org.flexunit.internals.dependency.ExternalRunnerDependencyWatcher;
+    import org.flexunit.runner.external.IExternalDependencyRunner;
+    import org.flexunit.runner.notification.Failure;
+    import org.flexunit.runner.notification.IAsyncStartupRunListener;
+    import org.flexunit.runner.notification.IRunListener;
+    import org.flexunit.runner.notification.IRunNotifier;
+    import org.flexunit.runner.notification.RunListener;
+    import org.flexunit.runner.notification.RunNotifier;
+    import org.flexunit.runner.notification.async.AsyncListenerWatcher;
+    import org.flexunit.runners.Parameterized;
+    import org.flexunit.token.AsyncCoreStartupToken;
+    import org.flexunit.token.AsyncTestToken;
+    import org.flexunit.token.ChildResult;
+    import org.flexunit.utils.ClassNameUtil;
+    import org.fluint.uiImpersonation.VisualTestEnvironmentBuilder;
+
+    [Event(type="testsComplete", type="flash.events.Event")]
+    [Event(type="runnerStart", type="flash.events.Event")]
+    [Event(type="testsStopped", type="flash.events.Event")]
+
+    /**
+     * FlexUnit4 Version: 4.1.00

+     *
+     * The FlexUnitCore is responsible for executing objects that implement an IRequest
+     * interface.  There are several ways that the IRequest can be provided to the
+     * FlexUnitCore.  If you pass FlexUnit4’s core anything other than an IRequest, the
+     * core uses these methods to generate a Request object before processing continues.

+     *
+     * Ways that an IRequest can be provided to the FlexUnitCore are as follows:
+     *

+     *
 A group of arguments of arguments can be provided to the #run method which will
+     * eventaully create an IRequest.

+     *
 A group of classes consisting of suites and test cases to run can be provided to the
+     * #runClasses()  method to generate an IRequest.

+     *
 An IRequest can be passed directly to the #runRequest() method.
+     * IRequests can be generated by calling static methods that create IRequests
+     * in the Request class.

+     *

+     *

+     * Ultimately, FlexUnit4 runs one and only one request per run. So, if you pass it multiple classes, etc.
+     * these are all wrapped in a single Request before execution begins.  Once the
+     * IRequest has been provided to the FlexUnitCore, the test run will begin
+     * once all IRunListener are ready.
+     *

+     * In order to add an IRunListener to the test run, the #addListener() method must
+     * called.  If one wishes to remove a listener from the test run, the #removeListener() method
+     * needs to be called with IRunListener to remove.
+     *

+     * Once the test run has finished execution, a Result will be obtained and the IRunListeners
+     * will be notified of the results of the test run.
+     *
+     * @see org.flexunit.runner.Request
+     * @see org.flexunit.runner.Result
+     * @see org.flexunit.runner.notification.IRunListener
+     */
+
+    public class FlexUnitCore extends EventDispatcher {
+        // We have a toggle in the compiler arguments so that we can choose whether or not the flex classes should
+        // be compiled into the FlexUnit swc.  For actionscript only projects we do not want to compile the
+        // flex classes since it will cause errors.
+        CONFIG::useFlexClasses {
+            // This class imports all Flex classes.
+            /**
+             * @private
+             */
+            private var t1:IncludeFlexClasses;
+        }
+
+        /**
+         * @private
+         */
+        private var notifier:IRunNotifier;
+
+
+        private var runnerExternalDependencyWatcher:ExternalRunnerDependencyWatcher;
+
+        /**
+         * @private
+         */
+        private var asyncListenerWatcher:AsyncListenerWatcher;
+
+        /**
+         * @private
+         */
+        private var _visualDisplayRoot:DisplayObjectContainer;
+
+        /**
+         * @private
+         */
+        private var topLevelRunner:IRunner;
+        /**
+         * @private
+         */
+        private var runListener:RunListener;
+        /**
+         * @private
+         */
+        private static const RUN_LISTENER:String = "runListener";
+        public static const TESTS_COMPLETE:String = "testsComplete";
+        public static const TESTS_STOPPED:String = "testsStopped";
+        public static const RUNNER_START:String = "runnerStart";
+        public static const RUNNER_COMPLETE:String = "runnerComplete";
+
+        //Just keep theories linked in until we decide how to deal with it
+        /**
+         * @private
+         */
+        private var theory:Theories;
+        /**
+         * @private
+         */
+        private var params:Parameterized;
+
+        /**
+         * Returns the version number.
+         */
+        public static function get version():String {
+            return "4.1.0.0rc2";
+        }
+
+
+        public function get visualDisplayRoot():DisplayObjectContainer {
+            return _visualDisplayRoot;
+        }
+
+        public function set visualDisplayRoot(value:DisplayObjectContainer):void {
+            _visualDisplayRoot = value;
+
+            //pass the stage along to the VisualEnvironmentBuilder..
+            VisualTestEnvironmentBuilder.getInstance(value);
+        }
+
+        /**
+         * Requests that the FlexUnitCore stop execution of the test environment.
+         * As Flash Player is single threaded, we will only be able to stop execution after the currently running test completes
+         * and before the next one begins, so this will always have a margin of error.
+         */
+        public function pleaseStop():void {
+
+            if (topLevelRunner) {
+                topLevelRunner.pleaseStop();
+            }
+
+            //dispatchEvent( new Event( TESTS_STOPPED ) );
+        }
+
+        private function dealWithArgArray(ar:Array, foundClasses:Array, missingClasses:Array):void {
+            for (var i:int = 0; i < ar.length; i++) {
+                try {
+                    if (ar[i] is String) {
+                        foundClasses.push(getDefinitionByName(ar[i]));
+                    } else if (ar[i] is Array) {
+                        dealWithArgArray(ar[i] as Array, foundClasses, missingClasses);
+                    } else if (ar[i] is IRequest) {
+                        foundClasses.push(ar[i]);
+                    } else if (ar[i] is Class) {
+                        foundClasses.push(ar[i]);
+                    } else if (ar[i] is Object) {
+                        //this is actually likely an instance.
+                        //eventually we intend to have more evolved support for
+                        //this, but, for right now, just try to make it a class
+                        var className:String = getQualifiedClassName(ar[i]);
+                        var definition:* = getDefinitionByName(className);
+                        foundClasses.push(definition);
+                    }
+                } catch (error:Error) {
+                    //logger.error( "Cannot find class {0}", ar[i] );
+                    var desc:IDescription = Description.createSuiteDescription(ar[i]);
+                    var failure:Failure = new Failure(desc, error);
+                    missingClasses.push(failure);
+                }
+            }
+        }
+
+        /**
+         * Determines what classes can be found in the provided args.  If any classes
+         * have been reported but are missing, those classes will be reported as failures in the returned
+         * Result.  The classes that are found in the arguments will be wrapped into a
+         * Request, and that Request will be used for the test run.
+         *
+         * @param args The arguments are provided for the test run.
+         * @return void.
+         */
+        public function run(... args):void {
+            var foundClasses:Array = new Array();
+            //Unlike JUnit, missing classes is probably unlikely here, but lets preserve the metaphor
+            //just in case
+            var missingClasses:Array = new Array();
+
+            dealWithArgArray(args, foundClasses, missingClasses);
+
+            runClasses.apply(this, foundClasses);
+
+            //This is kind of fake
+            //Need to tie this to the remaining result set
+            var result:Result = new Result();
+
+            for (var i:int = 0; i < missingClasses.length; i++) {
+                result.failures.push(missingClasses[i]);
+            }
+        }
+
+        /**
+         * Wraps the class arguments contained in args into a Request.
+         * The classes that are found in the arguments will be wrapped into a
+         * Request, and that Request will be used for the test run.
+         *
+         * @param args The class arguments that are provided for the test run.
+         */
+        public function runClasses(... args):void {
+            //This is just an optimization for the case where we are passed an IRequest
+            //Otherwise it goes through the trouble of re-wrapping it in a suite.
+            //When that happens we end up with potential sorting and filtering issues
+            if (args && (args.length == 1) && args[0] is IRequest) {
+                runRequest(args[0]);
+            } else {
+                runRequest(Request.classes.apply(this, args));
+            }
+        }
+
+        /**
+         * Runs the classes contained in the Request using the IRunner of
+         * the Request.  Feedback will be written while the tests
+         * are running and stack traces writes will be made for all failed tests after all tests
+         * complete.
+         *
+         * @param request The Request describing the IRunner to use for
+         * for the test run.
+         */
+        public function runRequest(request:Request):void {
+            runRunner(request.iRunner)
+        }
+
+        /**
+         * Runs the tests contained in IRunner if all IAsyncStartupRunListerners
+         * are ready; otherwise, the the test run will begin once all listeners have reported that they
+         * are ready.

+         *
+         * Once the test run begins, feedback will be written while the tests are running and stack traces
+         * writes will be made for all failed tests after all tests complete.
+         *
+         * @param runner The IRunner to use for this test run.
+         */
+        public function runRunner(runner:IRunner):void {
+
+            //Record the top level runner. This is the active runner in case we need to
+            //do something like stop the execution of the test run
+            topLevelRunner = runner;
+
+            if (runner is IExternalDependencyRunner) {
+                (runner as IExternalDependencyRunner).dependencyWatcher = runnerExternalDependencyWatcher;
+            }
+
+            if (runnerExternalDependencyWatcher.allDependenciesResolved && asyncListenerWatcher.allListenersReady) {
+                beginRunnerExecution(runner);
+            } else {
+                if (!asyncListenerWatcher.allListenersReady) {
+                    //we need to wait until all listeners are ready (or failed) before we can continue
+                    var tokenListeners:AsyncCoreStartupToken = asyncListenerWatcher.startUpToken;
+                    tokenListeners.runner = runner;
+                    tokenListeners.addNotificationMethod(verifyRunnerCanBegin);
+                }
+
+                if (!runnerExternalDependencyWatcher.allDependenciesResolved) {
+                    var tokenRunners:AsyncCoreStartupToken = runnerExternalDependencyWatcher.token;
+                    tokenRunners.runner = runner;
+                    tokenRunners.addNotificationMethod(verifyRunnerCanBegin);
+                }
+            }
+        }
+
+        protected function verifyRunnerCanBegin(runner:IRunner):void {
+            if (runnerExternalDependencyWatcher.allDependenciesResolved && asyncListenerWatcher.allListenersReady) {
+                beginRunnerExecution(runner);
+            }
+        }
+
+        /**
+         * Starts the execution of the IRunner.
+         */
+        protected function beginRunnerExecution(runner:IRunner):void {
+            var result:Result = new Result();
+            runListener = result.createListener();
+            addFirstListener(runListener);
+
+            var token:AsyncTestToken = new AsyncTestToken(ClassNameUtil.getLoggerFriendlyClassName(this));
+            token.addNotificationMethod(handleRunnerComplete);
+            token[RUN_LISTENER] = runListener;
+
+            dispatchEvent(new Event(RUNNER_START));
+
+            try {
+                notifier.fireTestRunStarted(runner.description);
+                runner.run(notifier, token);
+            }
+
+            catch (error:Error) {
+                //I think we need to further restrict the case where this is true
+                notifier.fireTestAssumptionFailed(new Failure(runner.description, error));
+
+                finishRun(runListener);
+            }
+        }
+
+        /**
+         * All tests have finished execution.
+         */
+        private function handleRunnerComplete(result:ChildResult):void {
+            var tokenRunListener:RunListener = result.token[RUN_LISTENER];
+
+            //Cleanup the top level runner
+            topLevelRunner = null;
+
+            //Cleanup up runListener reference
+            runListener = null;
+
+            finishRun(tokenRunListener);
+        }
+
+        /**
+         * Notifies that the runListener that the test run has finished.
+         *
+         * @param runListener The listern to notify about the test run finishing.
+         */
+        private function finishRun(runListener:RunListener):void {
+            notifier.fireTestRunFinished(runListener.result);
+            removeListener(runListener);
+
+            //Consider making this a custom event and attaching the result set
+            dispatchEvent(new Event(TESTS_COMPLETE));
+        }
+
+        /**
+         * Adds a generic listener for errors. In practice this is used to catch global
+         * errors to ensure that, if a developer does not properly code an async test
+         * using FlexUnit APIs, that the player is not stopped by a message dialog
+         * Receiving this top level error is *very* bad and causes an immediate stop.
+         *
+         * @param listener the listener to add
+         * @see org.flexunit.runner.notification.RunListener
+         */
+        public function addUncaughtErrorListener(loaderInfo:LoaderInfo, priority:int = 1):void {
+            //dereferencing this anonymously so we don't have problems with other
+            //FP versions
+
+            if (loaderInfo.hasOwnProperty("uncaughtErrorEvents")) {
+                IEventDispatcher(loaderInfo["uncaughtErrorEvents"]).addEventListener("uncaughtError", uncaughtErrorHandler, false, priority);
+            }
+        }
+
+        private function uncaughtErrorHandler(event:Event):void {
+            //We received a top level error here... this is most likely because
+            //someone screwed up an async call, however, even in that case
+            //we have limited ways to figure out why. we need to stop all
+            //of the tests immediately.
+            event.preventDefault();
+
+            var unknownError:UnknownError = new UnknownError(event);
+            var description:IDescription = Description.createTestDescription(UnknownError, "Uncaught Top Level Exception");
+            var failure:Failure = new Failure(description, unknownError);
+
+            notifier.fireTestFailure(failure);
+            notifier.fireTestRunFinished(runListener.result);
+
+            //Kill all listeners so they get no further events
+            notifier.removeAllListeners();
+
+            //Issue the pleaseStop to make the runners stop execution
+            pleaseStop();
+        }
+
+        /**
+         * Add a listener to be notified as the tests run.
+         * @param listener the listener to add
+         * @see org.flexunit.runner.notification.RunListener
+         */
+        public function addListener(listener:IRunListener):void {
+            notifier.addListener(listener);
+
+            if (listener is IAsyncStartupRunListener) {
+                asyncListenerWatcher.watchListener(listener as IAsyncStartupRunListener);
+            }
+        }
+
+        private function addFirstListener(listener:IRunListener):void {
+            notifier.addFirstListener(listener);
+
+            if (listener is IAsyncStartupRunListener) {
+                asyncListenerWatcher.watchListener(listener as IAsyncStartupRunListener);
+            }
+        }
+
+        /**
+         * Remove a listener.
+         * @param listener the listener to remove
+         */
+        public function removeListener(listener:IRunListener):void {
+            notifier.removeListener(listener);
+
+            if (listener is IAsyncStartupRunListener) {
+                asyncListenerWatcher.unwatchListener(listener as IAsyncStartupRunListener);
+            }
+        }
+
+        /**
+         * Create a new FlexUnitCore to run tests.
+         */
+        public function FlexUnitCore() {
+            notifier = new RunNotifier();
+
+            runnerExternalDependencyWatcher = new ExternalRunnerDependencyWatcher();
+
+            asyncListenerWatcher = new AsyncListenerWatcher(notifier, null);
+        }
+    }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 13965
Author:   build@adobe.com
Date:     2010-02-03T20:37:12.428300Z

Log Message:
-----------
Version update to 4.5.0

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/datavisualization/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_flashflexkit/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_dmv/src/mx/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/build.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airspark/src/spark/core/Version.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/VersionInfo.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Version.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1260100 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/core/Version.as
+++ frameworks/projects/framework/src/mx/core/Version.as
@@ -15,4 +15,4 @@
  *  @private
  *  Version string for this class.
  */
-mx_internal static const VERSION:String = "4.0.0.0";
+mx_internal static const VERSION:String = "4.5.0.13964";


Transferred from the Adobe Open Source Subversion Repository

Revision: 3563
Author:   jimurphy@adobe.com
Date:     2008-10-10T13:41:29.904903Z

Log Message:
-----------
Merged 3.0.x revisions 3421,3427,3442,3455,3457,3474,3477,3493,3500,3503,3513,3520,3531,3544 -> trunk
Integrate:
player 10.0.r12.036
lcds: 4.0.0.3542
coretech: 1.360354

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Install Flash Player 10 UB.dmg</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/DLocation.java</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/LoaderUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/rideau.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/RSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/tcal_conversion.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/tcal_edit.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/CrossDomainRSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/player/10/playerglobal.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/tcal_core.swc</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/flashplayer.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/install_flash_player_10_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/lnx/libflashplayer.so.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/win/FlashPlayer.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/10/mac/Flash Player.app.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/afe.jar</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261493 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -555,6 +555,7 @@
     private function focusInHandler(event:FocusEvent):void
     {
         var target:InteractiveObject = InteractiveObject(event.target);
+        // trace("FocusManager focusInHandler in  = " + this._form.systemManager.loaderInfo.url);
         // trace("FM " + this + " focusInHandler " + target);

 		// if the target is in a bridged application, let it handle the click.
@@ -601,6 +602,7 @@
     private function focusOutHandler(event:FocusEvent):void
     {
         var target:InteractiveObject = InteractiveObject(event.target);
+        // trace("FocusManager focusOutHandler in  = " + this._form.systemManager.loaderInfo.url);
         // trace("FM " + this + " focusOutHandler " + target);
     }

@@ -678,7 +680,8 @@
             return;
         }

-        // trace("FocusManager activating " + this);
+        //trace("FocusManager activating = " + this._form.systemManager.loaderInfo.url);
+        //trace("FocusManager activating " + this);

         // listen for focus changes, use weak references for the stage
 		// form.systemManager can be null if the form is created in a sandbox and
@@ -735,6 +738,7 @@
     public function deactivate():void
     {
         // trace("FocusManager deactivating " + this);
+        //trace("FocusManager deactivating = " + this._form.systemManager.loaderInfo.url);

         // listen for focus changes
 		var sm:ISystemManager = form.systemManager;
@@ -1666,7 +1670,24 @@
      */
     private function mouseFocusChangeHandler(event:FocusEvent):void
     {
+        // trace("FocusManager: mouseFocusChangeHandler  in  = " + this._form.systemManager.loaderInfo.url);
     	// trace("FocusManager: mouseFocusChangeHandler " + event);
+
+        // If relatedObject is null because we don't have access to the
+        // object getting focus then allow the Player to set focus
+        // to the object. The isRelatedObjectInaccessible property is
+        // Player 10 only so we have to test if it is available. We
+        // will only see isRelatedObjectInaccessible if we are a version "10" swf
+        // (-target-player=10). Version "9" swfs will not see the property
+        // even if running in Player 10.
+        if (event.relatedObject == null &&
+            "isRelatedObjectInaccessible" in event &&
+            event["isRelatedObjectInaccessible"] == true)
+        {
+            // lost focus to a control in different sandbox.
+            return;
+        }
+
         if (event.relatedObject is TextField)
         {
             var tf:TextField = event.relatedObject as TextField;
@@ -1675,7 +1696,7 @@
                 return; // pass it on
             }
         }
-
+
         event.preventDefault();
     }

@@ -1819,7 +1840,7 @@
      */
     private function mouseDownHandler(event:MouseEvent):void
     {
-        // trace("FocusManager mouseDownHandler by " + this);
+        // trace("FocusManager mouseDownHandler in  = " + this._form.systemManager.loaderInfo.url);
         // trace("FocusManager mouseDownHandler target " + event.target);

         if (event.isDefaultPrevented())


Transferred from the Adobe Open Source Subversion Repository

Revision: 10633
Author:   dloverin@adobe.com
Date:     2009-09-28T13:24:30.559033Z

Log Message:
-----------
Use styleManager instance instead of StyleManager singleton (framework and compiler generated code)

Modified compiler generated style code for the FlexInit class. The style related changes are only available with the -keep option. AST generation is coming later.

Only the framework project is changed here. The other projects are will be changed soon.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex and Paul
Tests run: checkintests, all Mustella tests(no new failures)
Is noteworthy for integration: no.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonBarButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/configuration_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserMonthArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleModule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IStyleManager2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TitleBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperDownSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PopUpButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/ProgrammaticSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/TabSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/textClasses/TextRange.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/CheckBoxIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/NumericStepperUpSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/RadioButtonIcon.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/SetStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ComboBoxArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/MenuBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressBarSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/Request.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DataGridHeaderBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SetStyleActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1269751 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/skins/halo/ComboBoxArrowSkin.as
+++ frameworks/projects/mx/src/mx/skins/halo/ComboBoxArrowSkin.as
@@ -140,7 +140,7 @@
 		var dropdownBorderColor:Number = getStyle("dropdownBorderColor");
 		var fillAlphas:Array = getStyle("fillAlphas");
 		var fillColors:Array = getStyle("fillColors");
-		StyleManager.getColorNames(fillColors);
+        styleManager.getColorNames(fillColors);
 		var highlightAlphas:Array = getStyle("highlightAlphas");
 		var themeColor:uint = getStyle("themeColor");


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1269781 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/skins/halo/DataGridSortArrow.as
+++ frameworks/projects/mx/src/mx/skins/halo/DataGridSortArrow.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 11118
Author:   gosmith@adobe.com
Date:     2009-10-23T23:35:38.504561Z

Log Message:
-----------
Did some code cleanup on the Spark components to enforce the conventions about how to order stuff within an AS file.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: None; no functional changes
Tests run: ant checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/CheckBox.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1279935 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RadioButton.as
+++ frameworks/projects/spark/src/spark/components/RadioButton.as
@@ -52,9 +52,9 @@
 //  Other metadata
 //--------------------------------------

+[AccessibilityClass(implementation="spark.accessibility.RadioButtonAccImpl")]
+
 [IconFile("RadioButton.png")]
-
-[AccessibilityClass(implementation="spark.accessibility.RadioButtonAccImpl")]

 /**
  *  The RadioButton component allows the user make a single choice
@@ -187,16 +187,6 @@
     //
     //--------------------------------------------------------------------------

-    /**
-     *  @private
-     */
-    override protected function initializeAccessibility():void
-    {
-        if (RadioButton.createAccessibilityImplementation != null)
-            RadioButton.createAccessibilityImplementation(this);
-    }
-
-
     //----------------------------------
     //  enabled
     //----------------------------------
@@ -227,6 +217,21 @@
     //  Properties
     //
     //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  autoGroupIndex
+    //----------------------------------
+
+    /**
+     *  @private
+     *  automaticRadioButtonGroups is shared with halo radio button groups.
+     *  Spark radio button groups are prefixed with _fx to differentiate the
+     *  Halo groups which are stored in the same table.
+     */
+    private function get autoGroupIndex():String
+    {
+        return "_spark_" + groupName;
+    }

     //----------------------------------
     //  group
@@ -459,6 +464,15 @@

     /**
      *  @private
+     */
+    override protected function initializeAccessibility():void
+    {
+        if (RadioButton.createAccessibilityImplementation != null)
+            RadioButton.createAccessibilityImplementation(this);
+    }
+
+    /**
+     *  @private
      *  Update properties before measurement/layout.
      */
     override protected function commitProperties():void
@@ -475,23 +489,32 @@
         super.commitProperties();
     }

+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        // If this rb is selected and in a group, make sure it is the group
+        // selection.  If it is not selected and it's in a group, make sure it
+        // is not the group selection.
+        if (group)
+        {
+            if (selected)
+                _group.selection = this;
+            else if (group.selection == this)
+                _group.selection = null;
+        }
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Methods
     //
     //--------------------------------------------------------------------------

-    /**
-     *  @private
-     *  automaticRadioButtonGroups is shared with halo radio button groups.
-     *  Spark radio button groups are prefixed with _fx to differentiate the
-     *  Halo groups which are stored in the same table.
-     */
-    private function get autoGroupIndex():String
-    {
-        return "_spark_" + groupName;
-    }
-
     /**
      *  @private
      *  Create radio button group if it does not exist
@@ -626,36 +649,11 @@
             addToGroup();

         var g:RadioButtonGroup = group;
+
         if (g.selection != this)
             g.setSelection(this);
     }

-    //--------------------------------------------------------------------------
-    //
-    //  Overridden functions: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number,
-                                                  unscaledHeight:Number):void
-    {
-        super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-        // If this rb is selected and in a group, make sure it is the group
-        // selection.  If it is not selected and it's in a group, make sure it
-        // is not the group selection.
-        if (group)
-        {
-            if (selected)
-                _group.selection = this;
-            else if (group.selection == this)
-                _group.selection = null;
-        }
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Overridden event handlers: UIComponent


Remove some debug printouts.

Remove some debug printouts.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@941 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/stage/client/StageSceneBlock.as
+++ src/as/com/threerings/stage/client/StageSceneBlock.as
@@ -64,12 +64,8 @@
                 continue;
             }

-            trace("MST loc: " + StageLocation(portal.loc).x + "," + StageLocation(portal.loc).y);
-
             var fineX :int = StageLocation(portal.loc).x - FULL_TILE_FACTOR * x;
             var fineY :int = StageLocation(portal.loc).y - FULL_TILE_FACTOR * y;
-
-            trace("MST part: " + fineX + "," + fineY);

             // Grab the portal image, and center it.
             var portalSprite :IsoSprite = new IsoSprite();
@@ -80,7 +76,6 @@

             portalSprite.sprites = [img];
             portalSprite.setSize(1, 1, 1);
-            trace("MST Adding portal: " + x + "," + y);
             portalSprite.moveTo(x, y, 0);

             if (_portSprites == null) {


If it were done, when 'tis done, then 'twer well, it were done properly.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@327 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/path/HermiteFunc.as
+++ src/as/com/threerings/flash/path/HermiteFunc.as
@@ -23,32 +23,46 @@

 /**
  * Interpolates cubically between two values, with beginning and end derivates set
- * to zero. TODO: Add support for specifying derivate values as well.
+ * to zero. See http://en.wikipedia.org/wiki/Cubic_Hermite_spline for details.
  */
 public class HermiteFunc extends InterpFunc
 {
-    public function HermiteFunc (start :int, end :int)
+    public function HermiteFunc (start :int, end :int, startSlope :Number = 0, endSlope :Number = 0)
     {
-        _start = start;
-        _end = end;
+        _p0 = start;
+        _p1 = end;
+        _m0 = startSlope;
+        _m1 = endSlope;
     }

     // from InterpFunc
     override public function getValue (t :Number) :int
     {
         if (t >= 1) {
-            return _end;
+            return _p1;
         } else if (t < 0) { // cope with a funny startOffset
-            return _start;
+            return _p0;
         } else {
-            var h00 :Number = 2*t*t*t - 3*t*t + 1;
-            var h01 :Number = -2*t*t*t + 3*t*t;
+            var tt :Number = t*t;
+            var ttt :Number = t2 * t;

-            return int(_start * h00 + _end * h01);
+            return int(_p0 * (2*ttt - 3*tt + 1) +
+                       _m0 * (ttt - 2*tt + t) +
+                       _p1 * (-2*ttt + 3*tt) +
+                       _m1 * (ttt - tt));
         }
     }

-    protected var _start :int;
-    protected var _end :int;
+    /** The coefficient for the spline that interpolates the beginning point value. */
+    protected var _p0 :Number;
+
+    /** The coefficient for the spline that interpolates the end point value. */
+    protected var _p1 :Number;
+
+    /** The coefficient for the spline that interpolates the beginning point derivate. */
+    protected var _m0 :Number;
+
+    /** The coefficient for the spline that interpolates the end point derivate. */
+    protected var _m1 :Number;
 }
 }


Clear out our _bstrap reference after we logoff.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5734 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/presents/client/Client.as
+++ src/as/com/threerings/presents/client/Client.as
@@ -436,6 +436,7 @@
     {
         // clear out our references
         _comm = null;
+        _bstrap = null;
         _omgr = null;
         _clobj = null;
         _cloid = -1;


Fixed merge issue with scopeName->scope in AsFactory.resolve

--- src/asfac/src/com/thedevstop/asfac/AsFactory.as
+++ src/asfac/src/com/thedevstop/asfac/AsFactory.as
@@ -1,4 +1,4 @@
-package com.thedevstop.asfac
+package com.thedevstop.asfac
 {
 	import avmplus.getQualifiedClassName;
 	import flash.errors.IllegalOperationError;
@@ -119,11 +119,11 @@
 		/**
 		 * Returns an instance for the target type, using prior registrations to fulfill constructor parameters.
 		 * @param	type The type being requested.
-		 * @param	scopeName The name of the scope being resolved from.
+		 * @param	scope The name or Class of the scope being resolved from.
 		 * @param 	useDefaultAsFallback Whether to use the DefaultScope as a fallback when registration not found in specified scope.
 		 * @return The resolved instance.
 		 */
-		public function resolve(type:Class, scopeName:String = DefaultScopeName, useDefaultAsFallback:Boolean=false):*
+		public function resolve(type:Class, scope:*=DefaultScopeName, useDefaultAsFallback:Boolean=false):*
 		{
 			var registrationsByScope:Dictionary = _registrations[type];


Flash: Small fix to the comment.

Flash: Small fix to the comment.

--- src/flash/plupload/src/com/plupload/Plupload.as
+++ src/flash/plupload/src/com/plupload/Plupload.as
@@ -73,7 +73,7 @@
 		private function init(e:Event = null):void {
 			removeEventListener(Event.ADDED_TO_STAGE, init);

-			// Allow upload cross domain access
+			// Allow cross domain scripting access
 			// Security.allowDomain("*");

 			// Setup id


fix DirectionalLight position init

fix DirectionalLight position init

--- src/aerys/minko/scene/node/light/DirectionalLight.as
+++ src/aerys/minko/scene/node/light/DirectionalLight.as
@@ -151,7 +151,7 @@
 			this.shadowSpread		= shadowSpread;
             this.shadowBias     	= shadowBias;

-			transform.lookAt(Vector4.ZERO, new Vector4(1, -1, 1));
+			transform.lookAt(Vector4.ZERO, new Vector4(1, 1, 1));
 		}

 		override minko_scene function cloneNode() : AbstractSceneNode


Show red lights for fuses that are completely wrong.


Transferred from the Adobe Open Source Subversion Repository

Revision: 11027
Author:   dloverin@adobe.com
Date:     2009-10-20T15:50:09.018295Z

Log Message:
-----------
Changes to enable using multiple style managers.

Multiple style managers are not the default yet. Can be enabled by compiling with -create-style-manager.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex, Paul
Tests run: checkintests, all mustella
Is noteworthy for integration: Yes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceGenerator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexChangeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSMergedStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262671 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
+++ frameworks/projects/framework/src/mx/styles/StyleProtoChain.as
@@ -121,7 +121,7 @@
             }
             else
             {
-                var decl:CSSStyleDeclaration = styleManager.getStyleDeclaration(type);
+                var decl:CSSStyleDeclaration = styleManager.getMergedStyleDeclaration(type);
                 if (decl)
                     classDecls.push(decl);
             }
@@ -262,7 +262,7 @@
                 {
                     if (styleNames[i].length)
                     {
-                        styleDeclaration = styleManager.getStyleDeclaration("." + styleNames[i]);
+                        styleDeclaration = styleManager.getMergedStyleDeclaration("." + styleNames[i]);
                         if (styleDeclaration)
                             universalSelectors.push(styleDeclaration);
                     }
@@ -557,7 +557,7 @@
                     {
                         if (styleNames[c].length)
                         {
-                            styleDeclarations.push(styleManager.getStyleDeclaration("." + styleNames[c]));
+                            styleDeclarations.push(styleManager.getMergedStyleDeclaration("." + styleNames[c]));
                         }
                     }
                 }
@@ -630,7 +630,7 @@
                 for (var c:int=0; c < styleNames.length; c++)
                 {
                     if (styleNames[c].length) {
-                        classSelectors.push(styleManager.getStyleDeclaration("." +
+                        classSelectors.push(styleManager.getMergedStyleDeclaration("." +
                             styleNames[c]));
                     }
                 }


- bugfix: BitmapResourceCacheItem now properly removes targets from it's target list once they ask for that.

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@816 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/external/BitmapResourceCacheItem.as
+++ src/reprise/external/BitmapResourceCacheItem.as
@@ -116,24 +116,13 @@
 		***************************************************************************/
 		protected function removeTarget(target:BitmapResource) : void
 		{
-			var i : int = m_targets.length;
-			var numTargets : int = 0;
-			var foundTarget : BitmapResource;
-
-			while (i--)
-			{
-				foundTarget = m_targets[i];
-				if (foundTarget == target)
-				{
-					m_targets[i] = null;
-				}
-				else if (foundTarget != null)
-				{
-					numTargets++;
-				}
-			}
-
-			if (numTargets == 0)
+			var index : int = m_targets.indexOf(target);
+			if (index != -1)
+			{
+				m_targets.splice(index, 1);
+			}
+
+			if (m_targets.length == 0)
 			{
 				m_loader.cancel();
 			}
@@ -179,8 +168,7 @@

 			for each (var target : BitmapResource in m_targets)
 			{
-				// target can be null. @see removeTarget
-				if (target) applyDataToTarget(target);
+				applyDataToTarget(target);
 			}
 			m_targets = null;

@@ -193,10 +181,8 @@
 			{
 				return;
 			}
-			var i : int = m_targets.length;
-			while (i--)
-			{
-				var target : BitmapResource = BitmapResource(m_targets[i]);
+			for each (var target : BitmapResource in m_targets)
+			{
 				target.setBytesLoaded(m_loader.bytesLoaded());
 				target.setBytesTotal(m_loader.bytesTotal());
 				target.updateProgress();


Support for editor feature: Set controller activate page.

--- source/fairygui/GComponent.as
+++ source/fairygui/GComponent.as
@@ -984,6 +984,23 @@
 		protected function constructFromXML(xml:Object):void
 		{
 		}
+
+		override public function setup_afterAdd(xml:Object):void
+		{
+			super.setup_afterAdd(xml);
+
+			var str:String = xml.getAttribute("controller");
+			if(str)
+			{
+				var arr:Array = str.split(",");
+				for(var i:int=0;i<arr.length;i+=2)
+				{
+					var cc:Controller = getController(arr[i]);
+					if(cc)
+						cc.selectedPageId = arr[i+1];
+				}
+			}
+		}

         private function ___added():void {
             var cnt: Number = this._transitions.length;


Removed RegisterUpdate() and Update().

Removed RegisterUpdate() and Update().


don't mess with the prototype anymore, swfdec handles it now

--- vivified/core/vivi_initialize.as
+++ vivified/core/vivi_initialize.as
@@ -22,7 +22,6 @@
   Breakpoint.list.push (this);
 };
 Breakpoint.list = new Array ();
-Breakpoint.prototype = new Object ();

 Wrap = function () {};
 Wrap.prototype = {};


Possible workaround for an issue where creating a Slider with a percentWidth and assigning the value before adding it to a container would break.

--- src/org/openPyro/controls/Slider.as
+++ src/org/openPyro/controls/Slider.as
@@ -64,7 +64,13 @@
 			}
 			this.invalidateSize()
 		}
-
+
+		override public function validateSize():void
+		{
+			super.validateSize();
+			value = _value;
+		}
+
 		public function set thumbButton(button:Button):void
 		{
 			if(_thumbButton){


Commit test.

Commit test.

--- test/org/igniterealtime/xiff/util/DateTimeParserTest.as
+++ test/org/igniterealtime/xiff/util/DateTimeParserTest.as
@@ -34,7 +34,7 @@
 		{
 			var date:Date = new Date( 2000, 10, 30, 0, 0 );
 			var dateAsString:String = DateTimeParser.date2string( date );
-			assertEquals( "2000-11-30", dateAsString );
+			assertEquals( "2000-12-30", dateAsString );
 		}
 	}
 }


Rip out unused SEI subtitle parsing.

Rip out unused SEI subtitle parsing.

--- HLSPlugin/src/com/kaltura/hls/m2ts/M2TSToFLVConverter.as
+++ HLSPlugin/src/com/kaltura/hls/m2ts/M2TSToFLVConverter.as
@@ -562,44 +562,6 @@
 			sendScriptDataFLVTag( timeStamp * 1000, subtitleObject);
 		}

-		private function parseAVCCCData(bytes:ByteArray, cursor:uint, length:uint):void
-		{
-			var dest:ByteArray = new ByteArray();
-			dest.endian = Endian.BIG_ENDIAN;
-			dest.writeInt(length);
-			if(length)
-				dest.writeBytes(bytes, cursor, length);
-
-			var tmp:ByteArray = new ByteArray();
-			tmp.endian = Endian.BIG_ENDIAN;
-			tmp.writeBytes(bytes, cursor, length);
-
-			if(false)
-			{
-				var tmpBuff:String = " Saw ";
-				for(var i:int=0; i<tmp.length; i++)
-					tmpBuff += tmp[i].toString(16);
-				trace(tmpBuff);
-			}
-
-			//TeletextParser.processTelxPacket(bytes, 1);
-
-			var encoder:Base64Encoder = new Base64Encoder();
-			encoder.encodeBytes(dest);
-			var encodedDest:String = encoder.toString();
-
-			var desiredIndex:uint;
-			for(desiredIndex = 0;
-				desiredIndex < _pendingCaptionInfos.length && _pendingCaptionInfos[desiredIndex].pts <= _avcPTS;
-				++desiredIndex)
-			{
-			}
-
-			var onCaptionInfo:* = ["onCaptionInfo", { type:"708", data:encodedDest }];
-			_pendingCaptionInfos.splice(desiredIndex, 0, { pts: _avcPTS, onCaptionInfo:onCaptionInfo });
-			sendPendingOnCaptionInfos(false);
-		}
-
 		private function sendNextPendingOnCaptionInfo(flushing:Boolean):Boolean
 		{
 			if(_pendingCaptionInfos.length == 0)
@@ -626,129 +588,11 @@
 			}
 			while(morePending);
 		}
-
-		private function parseAndFilterAVCSEI(bytes:ByteArray, cursor:uint, length:uint):void
-		{
-			var limit:uint = cursor + length;
-			var countryCode:uint;
-			var providerCode:uint;
-			var userIdentifier:uint;
-
-			// Filter by caption/AFD/bar.
-			countryCode = bytes[cursor++];
-			if(countryCode != 0xB5)
-				return;
-
-			// Range check.
-			if(cursor + 2 >= limit)
-				return;
-
-			// Filter by provider code.
-			providerCode = (bytes[cursor] << 8) + bytes[cursor + 1];
-			cursor += 2;
-			if(providerCode != 0x0031)
-				return;
-
-			// Range check.
-			if(cursor + 4 >= limit)
-				return;
-
-			// Filter by user type data (ATSC1)
-			userIdentifier  = (bytes[cursor] << 24) + (bytes[cursor + 1] << 16) + (bytes[cursor + 2] << 8) + bytes[cursor + 3];
-			cursor += 4;
-			if(userIdentifier != 0x47413934)
-				return;
-
-			// Range check.
-			if(cursor + 3 >= limit)
-				return;
-
-			// And look for cc_data.
-			var userDataTypeCode:uint = bytes[cursor++];
-			if(0x03 != userDataTypeCode)
-				return;
-
-			// Awesome - we can parse it.
-			parseAVCCCData(bytes, cursor, limit - cursor);
-		}
-
-		private function parseAVCSEIPayload(payloadType:uint, bytes:ByteArray, cursor:uint, length:uint):void
-		{
-			if(payloadType != 0x04)
-				return;
-
-			parseAndFilterAVCSEI(bytes, cursor, length);
-		}
-
-		private function parseAVCSEIRBSP(bytes:ByteArray, cursor:uint, length:uint):void
-		{
-			var limit:uint = cursor + length;
-			var payloadType:uint;
-			var payloadSize:uint;
-			var tmp:uint = 0;
-
-			while(cursor < limit)
-			{
-				payloadType = 0;
-				payloadSize = 0;
-
-				do
-				{
-					tmp = bytes[cursor];
-					cursor++;
-					payloadType += tmp;
-				} while ((0xff == tmp) && (cursor < limit));
-
-				if(cursor >= limit)
-					break;
-
-				do {
-					tmp = bytes[cursor];
-					cursor++;
-					payloadSize += tmp;
-				} while ((0xff == tmp) && (cursor < limit));
-
-				if(cursor + payloadSize > limit)
-					break;
-
-				parseAVCSEIPayload(payloadType, bytes, cursor, payloadSize);
-
-				cursor += payloadSize;
-			}
-		}
-
-		private function parseAVCSEINALU(bytes:ByteArray, cursor:uint, length:uint):void
-		{
-			var limit:uint = cursor + length;
-
-			cursor++; // move over NALU type
-
-			_seiRBSPBuffer.position = 0;
-			while(cursor < limit)
-			{
-				if(cursor + 2 < limit &&
-					bytes[cursor] == 0x00 &&
-					bytes[cursor + 1] == 0x00 &&
-					bytes[cursor + 2] == 0x03)
-				{
-					_seiRBSPBuffer.writeByte(bytes[cursor++]);
-					_seiRBSPBuffer.writeByte(bytes[cursor++]);
-					cursor++; // skip network emulation byte
-				}
-				else
-				{
-					_seiRBSPBuffer.writeByte(bytes[cursor++]);
-				}
-			}
-
-			parseAVCSEIRBSP(_seiRBSPBuffer, 0, _seiRBSPBuffer.position);
-		}
-
+
 		public function onAVCNALU(pts:Number, dts:Number, bytes:ByteArray, cursor:uint, length:uint):void
 		{
 			// What's the type?
 			var naluType:uint = bytes[cursor + 3] & 0x1f;
-
 			switch(naluType)
 			{
 				case  6: // SEI
@@ -796,11 +640,6 @@

 			switch(naluType)
 			{
-				case 0x06: // SEI
-					parseAVCSEINALU(bytes, cursor + 3, length - 3); // skip start code
-					appendAVCNALU(bytes, cursor + 3, length - 3); // skip start code
-					break;
-
 				case 0x07: // SPS
 					setAVCSPS(bytes, cursor, length);
 					appendAVCNALU(bytes, cursor + 3, length - 3);


Occam's razor.

Occam's razor.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@403 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flex/ChatControl.as
+++ src/as/com/threerings/flex/ChatControl.as
@@ -137,9 +137,7 @@
             _txt.text = _curLine;

             // request focus
-            callLater(function () :void {
-                _txt.setFocus();
-            });
+            callLater(_txt.setFocus);
             _controls.push(this);

         } else {


Better error reporting when connections blow up; r=Daniel

git-svn-id: c197267f952b24206666de142881703007ca05d5@10551 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/jivesoftware/xiff/core/XMPPBOSHConnection.as
+++ src/org/jivesoftware/xiff/core/XMPPBOSHConnection.as
@@ -241,7 +241,7 @@
 		private function httpError(req:XMLNode, isPollResponse:Boolean, evt:FaultEvent):void
 		{
 			active = false;
-			dispatchError("Unknown HTTP Error", "A BOSH error occurred", "sasl", -1);
+			dispatchError("Unknown HTTP Error", evt.fault.rootCause.text, "", -1);
 		}

 		protected override function sendXML(body:*):void
@@ -382,6 +382,7 @@
 	            else if (feature.nodeName == "session")
 	                authentication.session = true;
 	        }
+
 	        auth = authentication.auth;
 	        dispatchEvent(new ConnectionSuccessEvent());
 	        authHandler = handleAuthentication;


Add configure baseURL lookup to insert.php

--- Arguments/src/classes/AgoraMap.as
+++ Arguments/src/classes/AgoraMap.as
@@ -50,6 +50,8 @@
 	import mx.events.FlexEvent;
 	import mx.managers.DragManager;

+	import classes.Configure;
+
 	public class AgoraMap extends Canvas
 	{
 		public var layoutManager:ALayoutManager = null;
@@ -214,7 +216,7 @@
 		{
 			var urlLoader:URLLoader = new URLLoader;
 			var request:URLRequest = new URLRequest;
-			request.url = "http://agora.gatech.edu/dev/insert.php";
+			request.url = Configure.lookup("baseURL") + "insert.php";
 			request.data = new URLVariables("uid="+UserData.uid+"&pass_hash="+UserData.passHashStr+"&xml="+xml.toXMLString());
 			request.method = URLRequestMethod.GET;
 			urlLoader.load(request);


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1268602 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/controls/VSlider.as
+++ frameworks/projects/mx/src/mx/controls/VSlider.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.controls
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1259153 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/core/FlexBitmap.as
+++ frameworks/projects/framework/src/mx/core/FlexBitmap.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1259315 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/core/IFlexAsset.as
+++ frameworks/projects/framework/src/mx/core/IFlexAsset.as
@@ -26,6 +26,11 @@
  *  autogenerates a class to represent it, and all such classes
  *  declare that they implement IFlexAsset so that they can be
  *  distinguished from the code classes.</p>
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public interface IFlexAsset
 {