FIX: tearDown() was being called twice in some situations with asynchronous methods. An example would be addAsync() wrapping an event handler that is actually called synchronously. The TestCase logic is assuming that the method is always called asynchronously. But when stubbing out event dispatchers (e.g. socket connections), events may be dispatched synchronously.

--- as3/src/asunit/framework/TestCase.as
+++ as3/src/asunit/framework/TestCase.as
@@ -1,484 +1,487 @@
-package asunit.framework {
-    import flash.display.DisplayObject;
-    import flash.display.DisplayObjectContainer;
-    import flash.errors.IllegalOperationError;
-    import flash.events.Event;
-    import flash.utils.describeType;
-    import flash.utils.getDefinitionByName;
-    import flash.utils.setTimeout;
-
-    import asunit.errors.AssertionFailedError;
-    import asunit.util.ArrayIterator;
-    import asunit.util.Iterator;
-
-    /**
-     * A test case defines the fixture to run multiple tests. To define a test case

-     * 1) implement a subclass of TestCase

-     * 2) define instance variables that store the state of the fixture

-     * 3) initialize the fixture state by overriding setUp

-     * 4) clean-up after a test by overriding tearDown.

-     * Each test runs in its own fixture so there
-     * can be no side effects among test runs.
-     * Here is an example:
-     * <listing>
-     * public class MathTest extends TestCase {
-     *      private var value1:Number;
-     *      private var value2:Number;
-     *
-     *      public function MathTest(methodName:String=null) {
-     *         super(methodName);
-     *      }
-     *
-     *      override protected function setUp():void {
-     *         super.setUp();
-     *         value1 = 2;
-     *         value2 = 3;
-     *      }
-     * }
-     * </listing>
-     *
-     * For each test implement a method which interacts
-     * with the fixture. Verify the expected results with assertions specified
-     * by calling assertTrue with a boolean, or assertEquals
-     * with two primitive values that should match.
-     * <listing>
-     *    public function testAdd():void {
-     *        var result:Number = value1 + value2;
-     *        assertEquals(5, result);
-     *    }
-     * </listing>
-     *
-     *  There are three common types of test cases:
-     *
-     *

-     *
Simple unit test

-     *
Visual integration test

-     *
Asynchronous test

-     *

-     *
-     *  @includeExample MathUtilTest.as
-     *  @includeExample ComponentTestIntroduction.as
-     *  @includeExample ComponentUnderTest.as
-     *  @includeExample ComponentTestExample.as
-     *  @includeExample AsynchronousTestMethodExample.as
-     */
-    public class TestCase extends Assert implements Test {
-        protected static const PRE_SET_UP:int        = 0;
-        protected static const SET_UP:int             = 1;
-        protected static const RUN_METHOD:int         = 2;
-        protected static const TEAR_DOWN:int        = 3;
-        protected static const DEFAULT_TIMEOUT:int     = 1000;
-
-        protected var context:DisplayObjectContainer;
-        protected var fName:String;
-        protected var isComplete:Boolean;
-        protected var result:TestListener;
-        protected var testMethods:Array;
-
-        private var asyncQueue:Array;
-        private var currentMethod:String;
-        private var currentState:int;
-        private var layoutManager:Object;
-        private var methodIterator:Iterator;
-        private var runSingle:Boolean;
-
-        /**
-         * Constructs a test case with the given name.
-         *
-         * Be sure to implement the constructor in your own TestCase base classes.
-         *
-         * Using the optional testMethod constructor parameter is how we
-         * create and run a single test case and test method.
-         */
-        public function TestCase(testMethod:String = null) {
-            var description:XML = describeType(this);
-            var className:Object = description.@name;
-            var methods:XMLList = description..method.(@name.match("^test"));
-            if(testMethod != null) {
-                testMethods = testMethod.split(", ").join(",").split(",");
-                if(testMethods.length == 1) {
-                    runSingle = true;
-                }
-            } else {
-                setTestMethods(methods);
-            }
-            setName(className.toString());
-            resolveLayoutManager();
-            asyncQueue = [];
-        }
-
-        private function resolveLayoutManager():void {
-            // Avoid creating import dependencies on flex framework
-            // If you have the framework.swc in your classpath,
-            // the layout manager will be found, if not, a mcok
-            // will be used.
-            try {
-                var manager:Class = getDefinitionByName("mx.managers.LayoutManager") as Class;
-                layoutManager = manager["getInstance"]();
-                if(!layoutManager.hasOwnProperty("resetAll")) {
-                    throw new Error("TestCase :: mx.managers.LayoutManager missing resetAll method");
-                }
-            }
-            catch(e:Error) {
-                layoutManager = new Object();
-                layoutManager.resetAll = function():void {
-                };
-            }
-        }
-
-        /**
-         * Sets the name of a TestCase
-         * @param name The name to set
-         */
-        public function setName(name:String):void {
-            fName = name;
-        }
-
-        protected function setTestMethods(methodNodes:XMLList):void {
-            testMethods = new Array();
-            var methodNames:Object = methodNodes.@name;
-            var name:String;
-            for each(var item:Object in methodNames) {
-                name = item.toString();
-                testMethods.push(name);
-            }
-        }
-
-        public function getTestMethods():Array {
-            return testMethods;
-        }
-
-        /**
-         * Counts the number of test cases executed by run(TestResult result).
-         */
-        public function countTestCases():int {
-            return testMethods.length;
-        }
-
-        /**
-         * Creates a default TestResult object
-         *
-         * @see TestResult
-         */
-        protected function createResult():TestResult {
-            return new TestResult();
-        }
-
-        /**
-         * A convenience method to run this test, collecting the results with
-         * either the TestResult provided or a default, new TestResult object.
-         * Expects either:
-         * run():void // will return the newly created TestResult
-         * run(result:TestResult):TestResult // will use the TestResult
-         * that was passed in.
-         *
-         * @see TestResult
-         */
-        public function run():void {
-            getResult().run(this);
-        }
-
-        public function setResult(result:TestListener):void {
-            this.result = result;
-        }
-
-        internal function getResult():TestListener {
-            return (result == null) ? createResult() : result;
-        }
-
-        /**
-         * Runs the bare test sequence.
-         * @throws Error if any exception is thrown
-         */
-        public function runBare():void {
-            if(isComplete) {
-                return;
-            }
-            var name:String;
-            var itr:Iterator = getMethodIterator();
-            if(itr.hasNext()) {
-                name = String(itr.next());
-                currentState = PRE_SET_UP;
-                runMethod(name);
-            }
-            else {
-                cleanUp();
-                getResult().endTest(this);
-                isComplete = true;
-                dispatchEvent(new Event(Event.COMPLETE));
-            }
-        }
-
-        private function getMethodIterator():Iterator {
-            if(methodIterator == null) {
-                methodIterator = new ArrayIterator(testMethods);
-            }
-            return methodIterator;
-        }
-
-        /**
-        *   Override this method in Asynchronous test cases
-        *   or any other time you want to perform additional
-        *   member cleanup after all test methods have run
-        **/
-        protected function cleanUp():void {
-        }
-
-        private function runMethod(methodName:String):void {
-            try {
-                if(currentState == PRE_SET_UP) {
-                    currentState = SET_UP;
-                    getResult().startTestMethod(this, methodName);
-                    setUp(); // setUp may be async and change the state of methodIsAsynchronous
-                }
-                currentMethod = methodName;
-                if(!waitForAsync()) {
-                    currentState = RUN_METHOD;
-                    this[methodName]();
-                }
-            }
-            catch(assertionFailedError:AssertionFailedError) {
-                getResult().addFailure(this, assertionFailedError);
-            }
-            catch(unknownError:Error) {
-                getResult().addError(this, unknownError);
-            }
-            finally {
-                if(!waitForAsync()) {
-                    runTearDown();
-                }
-            }
-        }
-
-        /**
-         * Sets up the fixture, for example, instantiate a mock object.
-         * This method is called before each test is executed.
-         * throws Exception on error.
-         *
-         * @example This method is usually overridden in your concrete test cases:
-         *  <listing>
-         *  private var instance:MyInstance;
-         *
-         *  override protected function setUp():void {
-         *      super.setUp();
-         *      instance = new MyInstance();
-         *      addChild(instance);
-         *  }
-         *  </listing>
-         */
-        protected function setUp():void {
-        }
-        /**
-         *  Tears down the fixture, for example, delete mock object.
-         *
-         *  This method is called after a test is executed - even if the test method
-         *  throws an exception or fails.
-         *
-         *  Even though the base class TestCase doesn't do anything on tearDown,
-         *  It's a good idea to call super.tearDown() in your subclasses. Many projects
-         *  wind up using some common fixtures which can often be extracted out a common project
-         *  TestCase.
-         *
-         *  tearDown is not called when we tell a test case to execute
-         *  a single test method.
-         *
-         *  @throws Error on error.
-         *
-         *  @example This method is usually overridden in your concrete test cases:
-         *  <listing>
-         *  private var instance:MyInstance;
-         *
-         *  override protected function setUp():void {
-         *      super.setUp();
-         *      instance = new MyInstance();
-         *      addChild(instance);
-         *  }
-         *
-         *  override protected function tearDown():void {
-         *      super.tearDown();
-         *      removeChild(instance);
-         *  }
-         *  </listing>
-         *
-         */
-        protected function tearDown():void {
-        }
-
-        /**
-         * Returns a string representation of the test case
-         */
-        override public function toString():String {
-            if(getCurrentMethod()) {
-                return getName() + "." + getCurrentMethod() + "()";
-            }
-            else {
-                return getName();
-            }
-        }
-        /**
-         * Gets the name of a TestCase
-         * @return returns a String
-         */
-        public function getName():String {
-            return fName;
-        }
-
-        public function getCurrentMethod():String {
-            return currentMethod;
-        }
-
-        public function getIsComplete():Boolean {
-            return isComplete;
-        }
-
-        public function setContext(context:DisplayObjectContainer):void {
-            this.context = context;
-        }
-
-        /**
-        *   Returns the visual DisplayObjectContainer that will be used by
-        *   addChild and removeChild helper methods.
-        **/
-        public function getContext():DisplayObjectContainer {
-            return context;
-        }
-
-        /**
-        *   Called from within setUp or the body of any test method.
-        *
-        *   Any call to addAsync, will prevent test execution from continuing
-        *   until the duration (in milliseconds) is exceeded, or the function returned by addAsync
-        *   is called. addAsync can be called any number of times within a particular
-        *   test method, and will block execution until each handler has returned.
-        *
-        *   Following is an example of how to use the addAsync feature:
-        *   <listing>
-        *   public function testDispatcher():void {
-        *       var dispatcher:IEventDispatcher = new EventDispatcher();
-        *       // Subscribe to an event by sending the return value of addAsync:
-        *       dispatcher.addEventListener(Event.COMPLETE, addAsync(function(event:Event):void {
-        *           // Make assertions *inside* your async handler:
-        *           assertEquals(34, dispatcher.value);
-        *       }));
-        *   }
-        *   </listing>
-        *
-        *   If you just want to verify that a particular event is triggered, you don't
-        *   need to provide a handler of your own, you can do the following:
-        *   <listing>
-        *   public function testDispatcher():void {
-        *       var dispatcher:IEventDispatcher = new EventDispatcher();
-        *       dispatcher.addEventListener(Event.COMPLETE, addAsync());
-        *   }
-        *   </listing>
-        *
-        *   If you have a series of events that need to happen, you can generally add
-        *   the async handler to the last one.
-        *
-        *   The main thing to remember is that any assertions that happen outside of the
-        *   initial thread of execution, must be inside of an addAsync block.
-        **/
-        protected function addAsync(handler:Function = null, duration:Number=DEFAULT_TIMEOUT):Function {
-            if(handler == null) {
-                handler = function(args:*):* {return;};
-            }
-            var async:AsyncOperation = new AsyncOperation(this, handler, duration);
-            asyncQueue.push(async);
-            return async.getCallback();
-        }
-
-        internal function asyncOperationTimeout(async:AsyncOperation, duration:Number):void{
-            getResult().addError(this, new IllegalOperationError("TestCase.timeout (" + duration + "ms) exceeded on an asynchronous operation."));
-            asyncOperationComplete(async);
-        }
-
-        internal function asyncOperationComplete(async:AsyncOperation):void{
-            // remove operation from queue
-            var i:int = asyncQueue.indexOf(async);
-            asyncQueue.splice(i,1);
-            // if we still need to wait, return
-            if(waitForAsync()) return;
-            if(currentState == SET_UP) {
-                runMethod(currentMethod);
-            }
-            else if(currentState == RUN_METHOD) {
-                runTearDown();
-            }
-        }
-
-        private function waitForAsync():Boolean{
-            return asyncQueue.length > 0;
-        }
-
-        protected function runTearDown():void {
-            currentState = TEAR_DOWN;
-            if(isComplete) {
-                return;
-            }
-            if(!runSingle) {
-                getResult().endTestMethod(this, currentMethod);
-                tearDown();
-                layoutManager.resetAll();
-            }
-            setTimeout(runBare, 5);
-        }
-
-        /**
-        * Helper method for testing DisplayObjects.
-        *
-        * This method allows you to more easily add and manage DisplayObject
-        * instances in your TestCase.
-        *
-        * If you are using the regular TestRunner, you cannot add Flex classes.
-        *
-        * If you are using a FlexRunner base class, you can add either
-        * regular DisplayObjects or IUIComponents.
-        *
-        * Usually, this method is called within setUp, and removeChild
-        * is called from within tearDown. Using these methods, ensures that added
-        * children will be subsequently removed, even when tests fail.
-        *
-        * Here is an example of the addChild method:
-        * <listing>
-        *   private var instance:MyComponent;
-        *
-        *   override protected function setUp():void {
-        *       super.setUp();
-        *       instance = new MyComponent();
-        *       instance.addEventListener(Event.COMPLETE, addAsync());
-        *       addChild(instance);
-        *   }
-        *
-        *   override protected function tearDown():void {
-        *       super.tearDown();
-        *       removeChild(instance);
-        *   }
-        *
-        *   public function testParam():void {
-        *       assertEquals(34, instance.value);
-        *   }
-        * </listing>
-        **/
-        protected function addChild(child:DisplayObject):DisplayObject {
-            return getContext().addChild(child);
-        }
-
-        /**
-        * Helper method for removing added DisplayObjects.
-        *
-        * Update: This method should no longer fail if the provided DisplayObject
-        * has already been removed.
-        **/
-        protected function removeChild(child:DisplayObject):DisplayObject {
-            if(child == null) {
-                return null;
-            }
-            try {
-                return getContext().removeChild(child);
-            }
-            catch(e:Error) {
-            }
-            return null;
-        }
-    }
-}
+package asunit.framework {
+	import flash.display.DisplayObject;
+	import flash.display.DisplayObjectContainer;
+	import flash.errors.IllegalOperationError;
+	import flash.events.Event;
+	import flash.utils.describeType;
+	import flash.utils.getDefinitionByName;
+	import flash.utils.setTimeout;
+
+	import asunit.errors.AssertionFailedError;
+	import asunit.util.ArrayIterator;
+	import asunit.util.Iterator;
+
+	/**
+	 * A test case defines the fixture to run multiple tests. To define a test case

+	 * 1) implement a subclass of TestCase

+	 * 2) define instance variables that store the state of the fixture

+	 * 3) initialize the fixture state by overriding setUp

+	 * 4) clean-up after a test by overriding tearDown.

+	 * Each test runs in its own fixture so there
+	 * can be no side effects among test runs.
+	 * Here is an example:
+	 * <listing>
+	 * public class MathTest extends TestCase {
+	 *      private var value1:Number;
+	 *      private var value2:Number;
+	 *
+	 *      public function MathTest(methodName:String=null) {
+	 *         super(methodName);
+	 *      }
+	 *
+	 *      override protected function setUp():void {
+	 *         super.setUp();
+	 *         value1 = 2;
+	 *         value2 = 3;
+	 *      }
+	 * }
+	 * </listing>
+	 *
+	 * For each test implement a method which interacts
+	 * with the fixture. Verify the expected results with assertions specified
+	 * by calling assertTrue with a boolean, or assertEquals
+	 * with two primitive values that should match.
+	 * <listing>
+	 *    public function testAdd():void {
+	 *        var result:Number = value1 + value2;
+	 *        assertEquals(5, result);
+	 *    }
+	 * </listing>
+	 *
+	 *  There are three common types of test cases:
+	 *
+	 *

+	 *
Simple unit test

+	 *
Visual integration test

+	 *
Asynchronous test

+	 *

+	 *
+	 *  @includeExample MathUtilTest.as
+	 *  @includeExample ComponentTestIntroduction.as
+	 *  @includeExample ComponentUnderTest.as
+	 *  @includeExample ComponentTestExample.as
+	 *  @includeExample AsynchronousTestMethodExample.as
+	 */
+	public class TestCase extends Assert implements Test {
+		protected static const PRE_SET_UP:int        = 0;
+		protected static const SET_UP:int             = 1;
+		protected static const RUN_METHOD:int         = 2;
+		protected static const TEAR_DOWN:int        = 3;
+		protected static const DEFAULT_TIMEOUT:int     = 1000;
+
+		protected var context:DisplayObjectContainer;
+		protected var fName:String;
+		protected var isComplete:Boolean;
+		protected var result:TestListener;
+		protected var testMethods:Array;
+
+		private var asyncQueue:Array;
+		private var currentMethod:String;
+		private var currentState:int;
+		private var layoutManager:Object;
+		private var methodIterator:Iterator;
+		private var runSingle:Boolean;
+
+		/**
+		 * Constructs a test case with the given name.
+		 *
+		 * Be sure to implement the constructor in your own TestCase base classes.
+		 *
+		 * Using the optional testMethod constructor parameter is how we
+		 * create and run a single test case and test method.
+		 */
+		public function TestCase(testMethod:String = null) {
+			var description:XML = describeType(this);
+			var className:Object = description.@name;
+			var methods:XMLList = description..method.(@name.match("^test"));
+			if(testMethod != null) {
+				testMethods = testMethod.split(", ").join(",").split(",");
+				if(testMethods.length == 1) {
+					runSingle = true;
+				}
+			} else {
+				setTestMethods(methods);
+			}
+			setName(className.toString());
+			resolveLayoutManager();
+			asyncQueue = [];
+		}
+
+		private function resolveLayoutManager():void {
+			// Avoid creating import dependencies on flex framework
+			// If you have the framework.swc in your classpath,
+			// the layout manager will be found, if not, a mcok
+			// will be used.
+			try {
+				var manager:Class = getDefinitionByName("mx.managers.LayoutManager") as Class;
+				layoutManager = manager["getInstance"]();
+				if(!layoutManager.hasOwnProperty("resetAll")) {
+					throw new Error("TestCase :: mx.managers.LayoutManager missing resetAll method");
+				}
+			}
+			catch(e:Error) {
+				layoutManager = new Object();
+				layoutManager.resetAll = function():void {
+				};
+			}
+		}
+
+		/**
+		 * Sets the name of a TestCase
+		 * @param name The name to set
+		 */
+		public function setName(name:String):void {
+			fName = name;
+		}
+
+		protected function setTestMethods(methodNodes:XMLList):void {
+			testMethods = new Array();
+			var methodNames:Object = methodNodes.@name;
+			var name:String;
+			for each(var item:Object in methodNames) {
+				name = item.toString();
+				testMethods.push(name);
+			}
+		}
+
+		public function getTestMethods():Array {
+			return testMethods;
+		}
+
+		/**
+		 * Counts the number of test cases executed by run(TestResult result).
+		 */
+		public function countTestCases():int {
+			return testMethods.length;
+		}
+
+		/**
+		 * Creates a default TestResult object
+		 *
+		 * @see TestResult
+		 */
+		protected function createResult():TestResult {
+			return new TestResult();
+		}
+
+		/**
+		 * A convenience method to run this test, collecting the results with
+		 * either the TestResult provided or a default, new TestResult object.
+		 * Expects either:
+		 * run():void // will return the newly created TestResult
+		 * run(result:TestResult):TestResult // will use the TestResult
+		 * that was passed in.
+		 *
+		 * @see TestResult
+		 */
+		public function run():void {
+			getResult().run(this);
+		}
+
+		public function setResult(result:TestListener):void {
+			this.result = result;
+		}
+
+		internal function getResult():TestListener {
+			return (result == null) ? createResult() : result;
+		}
+
+		/**
+		 * Runs the bare test sequence.
+		 * @throws Error if any exception is thrown
+		 */
+		public function runBare():void {
+			if(isComplete) {
+				return;
+			}
+			var name:String;
+			var itr:Iterator = getMethodIterator();
+			if(itr.hasNext()) {
+				name = String(itr.next());
+				currentState = PRE_SET_UP;
+				runMethod(name);
+			}
+			else {
+				cleanUp();
+				getResult().endTest(this);
+				isComplete = true;
+				dispatchEvent(new Event(Event.COMPLETE));
+			}
+		}
+
+		private function getMethodIterator():Iterator {
+			if(methodIterator == null) {
+				methodIterator = new ArrayIterator(testMethods);
+			}
+			return methodIterator;
+		}
+
+		/**
+		*   Override this method in Asynchronous test cases
+		*   or any other time you want to perform additional
+		*   member cleanup after all test methods have run
+		**/
+		protected function cleanUp():void {
+		}
+
+		private function runMethod(methodName:String):void {
+			try {
+				if(currentState == PRE_SET_UP) {
+					currentState = SET_UP;
+					getResult().startTestMethod(this, methodName);
+					setUp(); // setUp may be async and change the state of methodIsAsynchronous
+				}
+				currentMethod = methodName;
+				if(!waitForAsync()) {
+					currentState = RUN_METHOD;
+					this[methodName]();
+				}
+			}
+			catch(assertionFailedError:AssertionFailedError) {
+				getResult().addFailure(this, assertionFailedError);
+			}
+			catch(unknownError:Error) {
+				getResult().addError(this, unknownError);
+			}
+			finally {
+				if(!waitForAsync()) {
+					runTearDown();
+				}
+			}
+		}
+
+		/**
+		 * Sets up the fixture, for example, instantiate a mock object.
+		 * This method is called before each test is executed.
+		 * throws Exception on error.
+		 *
+		 * @example This method is usually overridden in your concrete test cases:
+		 *  <listing>
+		 *  private var instance:MyInstance;
+		 *
+		 *  override protected function setUp():void {
+		 *      super.setUp();
+		 *      instance = new MyInstance();
+		 *      addChild(instance);
+		 *  }
+		 *  </listing>
+		 */
+		protected function setUp():void {
+		}
+		/**
+		 *  Tears down the fixture, for example, delete mock object.
+		 *
+		 *  This method is called after a test is executed - even if the test method
+		 *  throws an exception or fails.
+		 *
+		 *  Even though the base class TestCase doesn't do anything on tearDown,
+		 *  It's a good idea to call super.tearDown() in your subclasses. Many projects
+		 *  wind up using some common fixtures which can often be extracted out a common project
+		 *  TestCase.
+		 *
+		 *  tearDown is not called when we tell a test case to execute
+		 *  a single test method.
+		 *
+		 *  @throws Error on error.
+		 *
+		 *  @example This method is usually overridden in your concrete test cases:
+		 *  <listing>
+		 *  private var instance:MyInstance;
+		 *
+		 *  override protected function setUp():void {
+		 *      super.setUp();
+		 *      instance = new MyInstance();
+		 *      addChild(instance);
+		 *  }
+		 *
+		 *  override protected function tearDown():void {
+		 *      super.tearDown();
+		 *      removeChild(instance);
+		 *  }
+		 *  </listing>
+		 *
+		 */
+		protected function tearDown():void {
+		}
+
+		/**
+		 * Returns a string representation of the test case
+		 */
+		override public function toString():String {
+			if(getCurrentMethod()) {
+				return getName() + "." + getCurrentMethod() + "()";
+			}
+			else {
+				return getName();
+			}
+		}
+		/**
+		 * Gets the name of a TestCase
+		 * @return returns a String
+		 */
+		public function getName():String {
+			return fName;
+		}
+
+		public function getCurrentMethod():String {
+			return currentMethod;
+		}
+
+		public function getIsComplete():Boolean {
+			return isComplete;
+		}
+
+		public function setContext(context:DisplayObjectContainer):void {
+			this.context = context;
+		}
+
+		/**
+		*   Returns the visual DisplayObjectContainer that will be used by
+		*   addChild and removeChild helper methods.
+		**/
+		public function getContext():DisplayObjectContainer {
+			return context;
+		}
+
+		/**
+		*   Called from within setUp or the body of any test method.
+		*
+		*   Any call to addAsync, will prevent test execution from continuing
+		*   until the duration (in milliseconds) is exceeded, or the function returned by addAsync
+		*   is called. addAsync can be called any number of times within a particular
+		*   test method, and will block execution until each handler has returned.
+		*
+		*   Following is an example of how to use the addAsync feature:
+		*   <listing>
+		*   public function testDispatcher():void {
+		*       var dispatcher:IEventDispatcher = new EventDispatcher();
+		*       // Subscribe to an event by sending the return value of addAsync:
+		*       dispatcher.addEventListener(Event.COMPLETE, addAsync(function(event:Event):void {
+		*           // Make assertions *inside* your async handler:
+		*           assertEquals(34, dispatcher.value);
+		*       }));
+		*   }
+		*   </listing>
+		*
+		*   If you just want to verify that a particular event is triggered, you don't
+		*   need to provide a handler of your own, you can do the following:
+		*   <listing>
+		*   public function testDispatcher():void {
+		*       var dispatcher:IEventDispatcher = new EventDispatcher();
+		*       dispatcher.addEventListener(Event.COMPLETE, addAsync());
+		*   }
+		*   </listing>
+		*
+		*   If you have a series of events that need to happen, you can generally add
+		*   the async handler to the last one.
+		*
+		*   The main thing to remember is that any assertions that happen outside of the
+		*   initial thread of execution, must be inside of an addAsync block.
+		**/
+		protected function addAsync(handler:Function = null, duration:Number=DEFAULT_TIMEOUT):Function {
+			if(handler == null) {
+				handler = function(args:*):* {return;};
+			}
+			var async:AsyncOperation = new AsyncOperation(this, handler, duration);
+			asyncQueue.push(async);
+			return async.getCallback();
+		}
+
+		internal function asyncOperationTimeout(async:AsyncOperation, duration:Number):void{
+			getResult().addError(this, new IllegalOperationError("TestCase.timeout (" + duration + "ms) exceeded on an asynchronous operation."));
+			asyncOperationComplete(async);
+		}
+
+		internal function asyncOperationComplete(async:AsyncOperation):void{
+			// remove operation from queue
+			var i:int = asyncQueue.indexOf(async);
+			asyncQueue.splice(i,1);
+			// if we still need to wait, return
+			if(waitForAsync()) return;
+			if(currentState == SET_UP) {
+				runMethod(currentMethod);
+			}
+			else if(currentState == RUN_METHOD) {
+				runTearDown();
+			}
+		}
+
+		private function waitForAsync():Boolean{
+			return asyncQueue.length > 0;
+		}
+
+		protected function runTearDown():void {
+			if(currentState == TEAR_DOWN) {
+				return;
+			}
+			currentState = TEAR_DOWN;
+			if(isComplete) {
+				return;
+			}
+			if(!runSingle) {
+				getResult().endTestMethod(this, currentMethod);
+				tearDown();
+				layoutManager.resetAll();
+			}
+			setTimeout(runBare, 5);
+		}
+
+		/**
+		* Helper method for testing DisplayObjects.
+		*
+		* This method allows you to more easily add and manage DisplayObject
+		* instances in your TestCase.
+		*
+		* If you are using the regular TestRunner, you cannot add Flex classes.
+		*
+		* If you are using a FlexRunner base class, you can add either
+		* regular DisplayObjects or IUIComponents.
+		*
+		* Usually, this method is called within setUp, and removeChild
+		* is called from within tearDown. Using these methods, ensures that added
+		* children will be subsequently removed, even when tests fail.
+		*
+		* Here is an example of the addChild method:
+		* <listing>
+		*   private var instance:MyComponent;
+		*
+		*   override protected function setUp():void {
+		*       super.setUp();
+		*       instance = new MyComponent();
+		*       instance.addEventListener(Event.COMPLETE, addAsync());
+		*       addChild(instance);
+		*   }
+		*
+		*   override protected function tearDown():void {
+		*       super.tearDown();
+		*       removeChild(instance);
+		*   }
+		*
+		*   public function testParam():void {
+		*       assertEquals(34, instance.value);
+		*   }
+		* </listing>
+		**/
+		protected function addChild(child:DisplayObject):DisplayObject {
+			return getContext().addChild(child);
+		}
+
+		/**
+		* Helper method for removing added DisplayObjects.
+		*
+		* Update: This method should no longer fail if the provided DisplayObject
+		* has already been removed.
+		**/
+		protected function removeChild(child:DisplayObject):DisplayObject {
+			if(child == null) {
+				return null;
+			}
+			try {
+				return getContext().removeChild(child);
+			}
+			catch(e:Error) {
+			}
+			return null;
+		}
+	}
+}


Rename local variable in method Copier.copy: isClassCloneable -> isTypeCloneable

--- dolly-framework/src/main/actionscript/dolly/Copier.as
+++ dolly-framework/src/main/actionscript/dolly/Copier.as
@@ -27,8 +27,8 @@
 		var variable:Variable;
 		var accessor:Accessor;

-		const isClassCloneable:Boolean = type.hasMetadata(MetadataName.COPYABLE);
-		if (isClassCloneable) {
+		const isTypeCloneable:Boolean = type.hasMetadata(MetadataName.COPYABLE);
+		if (isTypeCloneable) {
 			for each(variable in type.variables) {
 				if (isVariableCopyable(variable)) {
 					result.push(variable);


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@1253157 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/effects/effectClasses/SeriesInterpolateInstance.as
+++ frameworks/projects/charts/src/mx/charts/effects/effectClasses/SeriesInterpolateInstance.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Argument Panel fixed

Argument Panel fixed

--- Arguments/src/components/ArgumentPanel.as
+++ Arguments/src/components/ArgumentPanel.as
@@ -461,9 +461,7 @@
 			stmtTypeLbl = new Label;
 			// default setting

-			//stmtTypeLbl.toolTip = Language.lookup("ParticularUniversalClarification");
-			//stmtTypeLbl.toolTip = "Please change it before commiting";
-			stmtTypeLbl.toolTip = "'Universal statement' is defined as a statement that can be falsified by one counterexample. Thus, laws, rules, and all statements that include 'ought,' 'should,' or other forms indicating normativity, are universal statements. Anything else is treated as a 'particular statement' including statements about possibilities.  The distinction is important only with regard to the consequences of different forms of objections: If the premise of an argument is 'defeated,' then the conclusion and the entire chain of arguments that depends on this premise is defeated as well; but if a premise is only 'questioned' or criticized, then the conclusion and everything depending is only questioned, but not defeated. While universal statements can easily be defeated by a single counterexample, it depends on an agreement among deliberators whether a counterargument against a particular statement is sufficient to defeat it, even though it is always sufficient to question it and to shift, thus, the burden of proof.";
+			stmtTypeLbl.toolTip = Language.lookup("ParticularUniversalClarification");
 			BindingUtils.bindProperty(stmtTypeLbl, "text",this, ["statementType"]);
 			stmtTypeLbl.addEventListener(MouseEvent.CLICK, onStmtTypeClicked);

@@ -504,11 +502,13 @@
 			stmtInfoVG.addElement(userIdLbl);

 			userIdLbl.text = "AU: " + author;
-			var userInfoStr:String = "User Name: " + AGORAModel.getInstance().userSessionModel.firstName + "\n" + "User ID: " + AGORAModel.getInstance().userSessionModel.uid
+			var userInfoStr:String = Language.lookup("Username")+ ": " +
+				AGORAModel.getInstance().userSessionModel.firstName + "\n" +
+				"User ID: " + AGORAModel.getInstance().userSessionModel.uid
 			userIdLbl.toolTip = userInfoStr;

 			negatedLbl = new Label;
-			negatedLbl.text = "It is not the case that";
+			negatedLbl.text = Language.lookup("ArgNotCase");
 			negatedLbl.visible = true;

@@ -522,11 +522,11 @@
 			doneHG = new HGroup;
 			doneHG.addElement(doneBtn);
 			addBtn = new Button;
-			addBtn.label = "add...";
+			addBtn.label = Language.lookup("Add") + "...";

 			bottomHG.addElement(addBtn);
 			deleteBtn = new Button;
-			deleteBtn.label = "delete...";
+			deleteBtn.label = Language.lookup("Delete") + "...";
 			deleteBtn.addEventListener(MouseEvent.CLICK,onDeleteBtnClicked);
 			bottomHG.addElement(deleteBtn);
 			addBtn.addEventListener(MouseEvent.CLICK, onAddBtnClicked);


update comment for asdoc

update comment for asdoc

--- src/com/google/analytics/campaign/CampaignTracker.as
+++ src/com/google/analytics/campaign/CampaignTracker.as
@@ -22,34 +22,33 @@
 {
     import com.google.analytics.utils.Variables;

-    /**
-     * Campaign tracker object.
-     * Contains all the data associated with a campaign.
-     *
-     * AdWords:
-     * The following variables
-     * name, source, medium, term, content
-     * are automatically generated for AdWords hits when autotagging
-     * is turned on through the AdWords interface.
-     *
-     *
-     * note:
-     * we can not use a CampaignInfo because here the serialization
-     * to URL have to be injected into __utmz and is then a special case.
-     *
-     * links:
-     *
-     * Understanding campaign variables: The five dimensions of campaign tracking
-     * http://www.google.com/support/googleanalytics/bin/answer.py?answer=55579&hl=en
-     *
-     * How does campaign tracking work?
-     * http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55540
-     *
-     * What is A/B Testing and how can it help me?
-     * http://www.google.com/support/googleanalytics/bin/answer.py?answer=55589
-     *
-     * What information do the filter fields represent?
-     * http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55588
+    /* Campaign tracker object.
+       Contains all the data associated with a campaign.
+
+       AdWords:
+       The following variables
+       name, source, medium, term, content
+       are automatically generated for AdWords hits when autotagging
+       is turned on through the AdWords interface.
+
+
+       note:
+       we can not use a CampaignInfo because here the serialization
+       to URL have to be injected into __utmz and is then a special case.
+
+       links:
+
+       Understanding campaign variables: The five dimensions of campaign tracking
+       http://www.google.com/support/googleanalytics/bin/answer.py?answer=55579&hl=en
+
+       How does campaign tracking work?
+       http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55540
+
+       What is A/B Testing and how can it help me?
+       http://www.google.com/support/googleanalytics/bin/answer.py?answer=55589
+
+       What information do the filter fields represent?
+       http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55588
      */
     public class CampaignTracker
     {


Remove fixed TODO

Remove fixed TODO

--- src/com/merlinds/miracle_tool/models/ProjectModel.as
+++ src/com/merlinds/miracle_tool/models/ProjectModel.as
@@ -140,7 +140,6 @@
 			sources.fixed = true;
 			for(var i:int = 0; i < n; i++){
 				//cloning
-				//TODO do cloning of animation to publish command
 				sources[i] = defaultSources[i].clone(scale);
 			}
 			//end


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@1260289 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/effects/Pause.as
+++ frameworks/projects/framework/src/mx/effects/Pause.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Issue #73: Support OAuth sign-in.

Issue #73: Support OAuth sign-in.

--- src/com/esri/builder/controllers/ApplicationCompleteController.as
+++ src/com/esri/builder/controllers/ApplicationCompleteController.as
@@ -17,6 +17,7 @@
 {

 import com.esri.ags.components.IdentityManager;
+import com.esri.ags.events.IdentityManagerEvent;
 import com.esri.builder.components.LogFileTarget;
 import com.esri.builder.components.ToolTip;
 import com.esri.builder.controllers.supportClasses.MachineDisplayName;
@@ -44,6 +45,7 @@
 import mx.managers.ToolTipManager;
 import mx.resources.ResourceManager;
 import mx.rpc.AsyncResponder;
+import mx.rpc.Responder;

 import spark.components.WindowedApplication;

@@ -84,9 +86,32 @@
         XML.ignoreWhitespace = true;
         XML.prettyIndent = 4;

-        IdentityManager.instance.enabled = true;
-
-        ToolTipManager.toolTipClass = com.esri.builder.components.ToolTip;
+        var portalURL:String = PortalModel.getInstance().portalURL;
+        var idManager:IdentityManager = IdentityManager.instance;
+
+        idManager.enabled = true;
+
+        if (PortalModel.getInstance().isAGO(portalURL))
+        {
+            idManager.addEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
+            PortalModel.getInstance().registerOAuthPortal(portalURL);
+            idManager.getCredential(portalURL, false, new Responder(getCredentialOutcomeHandler,
+                                                                    getCredentialOutcomeHandler));
+
+            function getCredentialOutcomeHandler(outcome:Object):void
+            {
+                idManager.removeEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
+            }
+
+            function showOAuthWebViewHandler(event:IdentityManagerEvent):void
+            {
+                idManager.removeEventListener(IdentityManagerEvent.SHOW_OAUTH_WEB_VIEW, showOAuthWebViewHandler);
+                event.preventDefault();
+                idManager.setCredentialForCurrentSignIn(null);
+            }
+        }
+
+        ToolTipManager.toolTipClass = ToolTip;

         // Can only have access to 'loaderInfo' when the app is complete.
         app.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);


Transferred from the Adobe Open Source Subversion Repository

Revision: 4921
Author:   jvroom@adobe.com
Date:     2009-02-10T22:15:20.383531Z

Log Message:
-----------
Bugs: LCDS-548 - Two more issues: if argumentNames was not set, we did not hit the special
case for a single XML parameter.  Secondly (and more importantly), if there was a single String
parameter and the content type was XML the String would get converted using the SimpleXMLEncoder
which escaped the string (and the request body would guaranteed to not be valid XML).
With this fix, a single String parameter is now fed in directly as the body of the HTTP
request when the content type is XML.

QA: yes, verify the bug is fixed

Doc: Could use a release note because of the behavioral change:

"There has been a minor behavior change to the HTTPService when you set
its contentType to 'application/xml'.  If you call 'send' with a single String parameter
that value is now treated as the XML String itself and placed directly into the request
body.  Previously the request body was formed by escaping all HTML control characters
found in the String."

Reviewers: Seth and Pete

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/http/Operation.as
+++ frameworks/projects/rpc/src/mx/rpc/http/Operation.as
@@ -224,6 +224,9 @@
                     }
                 }
             }
+            // Also do the XML content type special case when no argument names is set
+            else if (args.length == 1 && contentType == CONTENT_TYPE_XML)
+                params = args[0];
         }
         return sendBody(params);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2185
Author:   jimurphy@adobe.com
Date:     2008-06-23T20:04:23.150071Z

Log Message:
-----------
Merged 3.0.x revisions [2108,2111,2113,2142,2145,2147,2149-2150,2171,2178,2183] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/templates/html-templates/express-installation-with-history/history/historyFrame.html</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/swfutils/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/BindingUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/debugger/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/asc/build/java/build.xml</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/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/antTasks/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/templates/html-templates/client-side-detection-with-history/history/historyFrame.html</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/Binding.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/types/SOAPArrayType.as</path>
<path kind="file" action="M">/flex/sdk/trunk/templates/html-templates/no-player-detection-with-history/history/historyFrame.html</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as
+++ frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as
@@ -2380,7 +2380,7 @@
                 var property:XML = properties[0];
                 var propertyType:String = property.@type;
                 var tempValue:* = parent[propertyName];
-                if (propertyType == "Object" || propertyType == "*" || TypeIterator.isIterable(existingValue))
+                if (propertyType == "Object" || propertyType == "*" || TypeIterator.isIterable(tempValue))
                     existingValue = tempValue;
             }
         }


silence binding warnings

silence binding warnings

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/UIItemRendererBase.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/UIItemRendererBase.as
@@ -113,6 +113,7 @@

 		private var _data:Object;

+        [Bindable("__NoChangeEvent__")]
 		/**
 		 *  The data being represented by this itemRenderer. This can be something simple like a String or
 		 *  a Number or something very complex.


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@1248649 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/olap/CubeNodeBuilder.as
+++ frameworks/projects/advancedgrids/src/mx/olap/CubeNodeBuilder.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 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.olap


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@1260848 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/formatters/DateFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/DateFormatter.as
@@ -58,6 +58,11 @@
  *  @includeExample examples/DateFormatterExample.mxml
  *
  *  @see mx.formatters.DateBase
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class DateFormatter extends Formatter
 {
@@ -89,6 +94,11 @@
      *  @param str Date that is formatted as a String.
      *
      *  @return Date object.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected static function parseDateString (str:String):Date
     {
@@ -311,6 +321,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function DateFormatter()
     {
@@ -474,6 +489,11 @@
      *

      *
      *  @default "MM/DD/YYYY"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get formatString():String
     {
@@ -521,6 +541,11 @@
      *
      *  @return Formatted String. Empty if an error occurs. A description
      *  of the error condition is written to the error property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     override public function format(value:Object):String
     {


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@1261009 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 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@1262215 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/resources/ResourceBundle.as
+++ frameworks/projects/framework/src/mx/resources/ResourceBundle.as
@@ -31,6 +31,11 @@
  *
  *  @see mx.resources.IResourceBundle
  *  @see mx.resources.IResourceManager
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class ResourceBundle implements IResourceBundle
 {
@@ -91,6 +96,11 @@
      *  @param currentDomain The ApplicationDomain that the resource bundle is in.
      *
      *  @return The resource bundle that matches the specified name and domain.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public static function getResourceBundle(
                                 baseName:String,
@@ -170,6 +180,11 @@
      *
      *  @param bundleName A name that identifies this bundle,
      *  such as "MyResources".
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function ResourceBundle(locale:String = null,
                                    bundleName:String = null)
@@ -208,6 +223,11 @@

     /**
      *  @copy mx.resources.IResourceBundle#bundleName
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get bundleName():String
     {
@@ -226,6 +246,11 @@

     /**
      *  @copy mx.resources.IResourceBundle#content
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get content():Object
     {
@@ -244,6 +269,11 @@

     /**
      *  @copy mx.resources.IResourceBundle#locale
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get locale():String
     {
@@ -266,6 +296,11 @@
      *  you can set the key-value pairs on the content object.

      *
      *  @return The Object that contains key-value pairs for the bundle's resources.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     protected function getContent():Object
     {
@@ -298,6 +333,11 @@
      *  This parameter is optional; its default value is true.
      *
      *  @return The value of the specified resource, as a Boolean.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getBoolean(key:String, defaultValue:Boolean = true):Boolean
     {
@@ -333,6 +373,11 @@
      *  @param key A String identifying a resource in this ResourceBundle.
      *
      *  @return The value of the specified resource, as a Number.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getNumber(key:String):Number
     {
@@ -360,6 +405,11 @@
      *  @param key A String identifying a resource in this ResourceBundle.
      *
      *  @return The value of the specified resource, as a String.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getString(key:String):String
     {
@@ -394,6 +444,11 @@
      *
      *  @return The value of the specified resource,
      *  as an Array of Strings.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getStringArray(key:String):Array
     {
@@ -430,6 +485,11 @@
      *  @param key A String identifying a resource in this ResourceBundle.
      *
      *  @return An Object that is the value of the specified resource.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function getObject(key:String):Object
     {


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@1262310 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as
+++ frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2006 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.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3184
Author:   shodgson@adobe.com
Date:     2008-09-11T22:51:31.586220Z

Log Message:
-----------
Update to Channel failover to survive transient network disconnects (i.e. HTTP proxy connection severing)

Bug: NA
QA: Yes - testable via judicious breakpointing or via an automated test run in concert with Shunra or something similar perhaps?
Doc: No
Checkintests Pass: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as
@@ -362,7 +362,7 @@
     override protected function internalDisconnect(rejected:Boolean = false):void
     {
         // Attempt to notify the server of the disconnect.
-        if (!rejected)
+        if (!rejected && !shouldBeConnected)
         {
             var msg:CommandMessage = new CommandMessage();
             msg.operation = CommandMessage.DISCONNECT_OPERATION;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3035
Author:   jvroom@adobe.com
Date:     2008-08-29T06:18:11.275196Z

Log Message:
-----------
* Added HTTPMultiService component - refactored the guts of HTTPService into a new
class AbstractOperation which HTTPService now wraps.

* Moved concurrency and showBusyCursor classes up to the mx.rpc level from mx.rpc.mxml.
Partly this improves consistency and partly because it is awkward to implement them
with the wrapping design in the subclass.  This does introduce a new dependency on
CursorManager in mx.rpc.HTTPService, though I think that should turn into a "runtime binding"
so we remove the compile time binding altogether.

* Added managers, operationManager, resultType, resultElementType, properties to the
AbstractService and AbstractInvoker classes.  These are used to improve the metadata information
on these operations for better tooling in the future, and to allow management services to
tie into the service infrastructure.

* AsyncToken gets a default parameter for its constructor so it can be used in MXML.

* Moved endpoint property up from the MXML to the regular mx.rpc version to improve consistency

The blazeds RPC tests passed unfortunately I had problems getting the RPC tests in the sdk branch
to build and run so let me know if you see any problems on those.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/WebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as
+++ frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as
@@ -146,34 +146,6 @@
         _concurrency = c;
     }

-    [Inspectable(category="General")]
-    /**
-     * This property allows the developer to quickly specify an endpoint for a RemoteObject
-     * destination without referring to a services configuration file at compile time or programmatically creating
-     * a ChannelSet. It also overrides an existing ChannelSet if one has been set for the RemoteObject service.
-     *
-     *
If the endpoint url starts with "https" a SecureAMFChannel will be used, otherwise an AMFChannel will
-     * be used. Two special tokens, {server.name} and {server.port}, can be used in the endpoint url to specify
-     * that the channel should use the server name and port that was used to load the SWF.

-     *
-     *
Note: This property is required when creating AIR applications.

-     */
-    public function get endpoint():String
-    {
-        return _endpoint;
-    }
-
-    public function set endpoint(url:String):void
-    {
-        // If endpoint has changed, null out channelSet to force it
-        // to be re-initialized on the next Operation send
-        if (_endpoint != url || url == null)
-        {
-            _endpoint = url;
-            channelSet = null;
-        }
-    }
-
     [Inspectable(defaultValue="false", category="General")]
     /**
     * If true, a busy cursor is displayed while a service is executing. The default
@@ -188,7 +160,6 @@
     {
         _showBusyCursor = sbc;
     }
-

     //--------------------------------------------------------------------------
     //
@@ -276,6 +247,8 @@
     {
         this.document = document;
         this.id = id;
+
+        initialize();
     }

@@ -320,8 +293,6 @@
     private var _concurrency:String;

     private var _showBusyCursor:Boolean;
-
-    private var _endpoint:String;
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20149
Author:   klin@adobe.com
Date:     2011-02-04T21:39:31.000080Z

Log Message:
-----------
Add and update [Inspectable] metadata across spark components.

QE notes: No
Doc notes: No
Bugs: SDK-28942
Reviewer: Carol
Tests run: cyclone server, checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TileGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/modules/ModuleLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/NumericStepper.as
+++ frameworks/projects/spark/src/spark/components/NumericStepper.as
@@ -351,6 +351,8 @@
      */
     private var maxChanged:Boolean = false;

+    [Inspectable(category="General", defaultValue="10.0")]
+
     /**
      *  Number which represents the maximum value possible for
      *  value. If the values for either
@@ -380,6 +382,8 @@
      */
     private var stepSizeChanged:Boolean = false;

+    [Inspectable(category="General", defaultValue="1.0", minValue="0.0")]
+
     /**
      *  @private
      */
@@ -430,6 +434,8 @@
      *  @private
      */
     private var maxCharsChanged:Boolean = false;
+
+    [Inspectable(category="General", defaultValue="0")]

     /**
      *  The maximum number of characters that can be entered in the field.
@@ -566,13 +572,11 @@
      */
     private var _imeMode:String = null;

-    [Inspectable(defaultValue="")]
-
     /**
      *  @private
      */
     private var imeModeChanged:Boolean = false;
-
+
     /**
      *  Specifies the IME (Input Method Editor) mode.
      *  The IME enables users to enter text in Chinese, Japanese, and Korean.


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

--- frameworks/projects/authoringsupport/src/AuthoringSupportClasses.as
+++ frameworks/projects/authoringsupport/src/AuthoringSupportClasses.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-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
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/framework/src/mx/collections/ICollectionView.as
+++ frameworks/projects/framework/src/mx/collections/ICollectionView.as
@@ -0,0 +1,231 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 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.collections
+{
+
+import flash.events.IEventDispatcher;
+import mx.events.CollectionEvent;
+
+/**
+ *  Dispatched when the ICollectionView has been updated in some way.
+ *
+ *  @eventType mx.events.CollectionEvent.COLLECTION_CHANGE
+ */
+[Event(name="collectionChange", type="mx.events.CollectionEvent")]
+
+/**
+ *  An ICollectionView is a view onto a collection of data.
+ *  The view can be modified to show the data sorted according to various
+ *  criteria or reduced by filters without modifying the underlying data.
+ *  An IViewCursor provides to access items within a
+ *  collection. You can modify the collection by using the IViewCursor
+ *  interface insert() and remove() methods.
+ *
+ *
An ICollectionView may be a view onto data that has been
+ *  retrieved from a remote location.
+ *  When Implementing this interface for data
+ *  that may be remote it is important to handle the case where data
+ *  may not yet be available, which is indicated by the
+ *  ItemPendingError.

+ *
+ *
The IList interface is an alternative to the
+ *  ICollectionView interface.

+ *
+ *  @see mx.collections.IViewCursor
+ *  @see mx.collections.errors.ItemPendingError
+ *  @see mx.collections.IList
+ */
+public interface ICollectionView extends IEventDispatcher
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  length
+	//----------------------------------
+
+    /**
+     *  The number of items in this view.
+	 *  0 means no items, while -1 means that the length is unknown.
+     */
+    function get length():int;
+
+	//----------------------------------
+	//  filterFunction
+	//----------------------------------
+
+    /**
+     *  A function that the view will use to eliminate items that do not
+     *  match the function's criteria.
+	 *  A filterFunction is expected to have the following signature:
+	 *
+	 *
f(item:Object):Boolean

+	 *
+	 *  where the return value is true if the specified item
+	 *  should remain in the view.
+	 *
+     *
If a filter is unsupported, Flex throws an error when accessing
+     *  this property.
+     *  You must call refresh() after setting the
+	 *  filterFunction property for the view to update.

+	 *
+ 	 *
Note: The Flex implementations of ICollectionView retrieve all
+	 *  items from a remote location before executing the filter function.
+	 *  If you use paging, apply the filter to the remote collection before
+	 *  you retrieve the data.

+	 *
+     *  @see #refresh()
+     */
+    function get filterFunction():Function;
+
+	/**
+	 *  @private
+	 */
+	function set filterFunction(value:Function):void;
+
+	//----------------------------------
+	//  sort
+	//----------------------------------
+
+    /**
+     *  The Sort that will be applied to the ICollectionView.
+	 *  Setting the sort does not automatically refresh the view,
+	 *  so you must call the refresh() method
+	 *  after setting this property.
+     *  If sort is unsupported an error will be thrown when accessing
+     *  this property.
+	 *
+	 *
Note: The Flex implementations of ICollectionView retrieve all
+	 *  items from a remote location before executing a sort.
+	 *  If you use paging with a sorted list, apply the sort to the remote
+	 *  collection before you retrieve the data.

+	 *
+     *  @see #refresh()
+     */
+    function get sort():Sort;
+
+	/**
+	 *  @private
+	 */
+    function set sort(value:Sort):void;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Creates a new IViewCursor that works with this view.
+     *
+     *  @return A new IViewCursor implementation.
+     *
+     */
+    function createCursor():IViewCursor;
+
+    /**
+     *  Returns whether the view contains the specified object.
+	 *  Unlike the IViewCursor.findxxx methods,
+	 *  this search is succesful only if it finds an item that exactly
+	 *  matches the parameter.
+     *  If the view has a filter applied to it this method may return
+	 *  false even if the underlying collection
+	 *  does contain the item.
+     *
+     *  @param item The object to look for.
+	 *
+     *  @return true if the ICollectionView, after applying any filter,
+     *  contains the item; false otherwise.
+     */
+    function contains(item:Object):Boolean;
+
+    /**
+     *  Prevents changes to the collection itself and items within the
+	 *  collection from being dispatched by the view.
+	 *  Also prevents the view from updating the positions of items
+	 *  if the positions change in the collection.
+	 *  The changes will be queued and dispatched appropriately
+	 *  after enableAutoUpdate is called.
+	 *  If more events than updates to a single item occur,
+	 *  the view may end up resetting.
+	 *  The disableAutoUpdate method acts cumulatively;
+	 *  the same number of calls to enableAutoUpdate
+	 *  are required for the view to dispatch events and refresh.
+	 *  Note that disableAutoUpdate only affects the
+     *  individual view; edits may be detected on an individual
+	 *  basis by other views.
+     */
+    function disableAutoUpdate():void;
+
+    /**
+     *  Enables auto-updating.
+	 *  See disableAutoUpdate for more information.
+	 *
+     *  @see #disableAutoUpdate()
+     */
+    function enableAutoUpdate():void;
+
+    /**
+     *  Notifies the view that an item has been updated.
+	 *  This method is useful if the contents of the view do not implement
+	 *  IPropertyChangeNotifier.
+	 *  If the call to this method includes a property parameter,
+	 *  the view may be able to optimize its notification mechanism.
+     *  Otherwise it may choose to simply refresh the whole view.
+     *
+     *  @param item The item within the view that was updated.
+	 *
+     *  @param property The name of the property that was updated.
+	 *
+     *  @param oldValue The old value of that property. (If property
+	 *  was null, this can be the old value of the item.).
+	 *
+     *  @param newValue The new value of that property. (If property
+	 *  was null, there's no need to specify this as the item is assumed
+	 *  to be the new value.)
+     *
+     *  @see mx.events.CollectionEvent
+     *  @see mx.core.IPropertyChangeNotifier
+     *  @see mx.events.PropertyChangeEvent
+     */
+    function itemUpdated(item:Object, property:Object = null,
+                         oldValue:Object = null, newValue:Object = null):void;
+
+    /**
+     *  Applies the sort and filter to the view.
+	 *  The ICollectionView does not detect changes to a sort or
+	 *  filter automatically, so you must call the refresh()
+	 *  method to update the view after setting the sort
+	 *  or filterFunction property.
+	 *  If your ICollectionView implementation also implements
+	 *  the IMXMLObject interface, you should to call the
+	 *  refresh() method from your initialized()
+	 *  method.
+	 *
+     *
Returns true if the refresh was successful
+	 *  and false if the sort is not yet complete
+	 *  (e.g., items are still pending).
+	 *  A client of the view should wait for a CollectionEvent event
+	 *  with the CollectionEventKind.REFRESH kind
+	 *  property to ensure that the refresh() operation is
+	 *  complete.

+     *
+     *  @return true if the refresh() was complete,
+	 *  false if the refresh() is incomplete.
+     */
+    function refresh():Boolean;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 20843
Author:   mhorn@adobe.com
Date:     2011-03-14T14:36:04.836183Z

Log Message:
-----------
merge

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/StringUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TabBar.as</path>

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

--- frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as
+++ frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as
@@ -988,7 +988,8 @@
     }

     /**
-     *  Lists all of the locale ID names supported by this class.
+     *  Lists all of the locale ID names supported by this class. This is a list of locales supported by
+     *  the operating system, not a list of locales that the ResourceManager has resources for.
      *
      *  @return A vector of strings containing all of the locale ID names
      *         supported by this class and operating system.


Add fallback font name for locale-specific font families.

--- src/com/esri/builder/controllers/LocaleController.as
+++ src/com/esri/builder/controllers/LocaleController.as
@@ -108,7 +108,15 @@

     private function toFontFamily(fontNames:Array):String
     {
-        return fontNames ? fontNames.join(',') : "";
+        if (!fontNames)
+        {
+            return "";
+        }
+
+        var fallbackFontName:String = "_sans";
+        fontNames.push(fallbackFontName);
+
+        return fontNames.join(',');
     }

     private function setLocaleSpecificStyles(locale:String):void


Added in missing semicolon. Current implementation could be abstracted at the InteractiveVisualization and each tool could have an option to enable unobtrusive tooltips.

--- WeaveUI/src/weave/visualization/layers/InteractiveVisualization.as
+++ WeaveUI/src/weave/visualization/layers/InteractiveVisualization.as
@@ -802,7 +802,7 @@
 				else
 				{
 					var text:String = ProbeTextUtils.getProbeText(keySet.keys, additionalProbeColumns);
-					var colorLegend:SimpleVisTool
+					var colorLegend:SimpleVisTool;
 					colorLegend = getParentTool(parent, ColorBinLegendTool)
 					if( colorLegend )
 						if( (colorLegend as ColorBinLegendTool).useUnobtrusiveToolTips.value == true )


Transferred from the Adobe Open Source Subversion Repository

Revision: 21594
Author:   deeptika@adobe.com
Date:     2011-07-18T11:39:38.158141Z

Log Message:
-----------
Changing the style setting mechanism in charts (moving to defaults.css) to fix memory leak in charts.
QE notes:
Doc notes:
Bugs: FLEXDMV-2626 (Views with charts not getting GC-ed)
Reviewer:
Tests run: Mustella test suite for charts - cyclone tested by QE
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/charts.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/chartClasses/ChartBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/AreaSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/BubbleChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/ColumnChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/charts-4.X.0.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/GridLines.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/PieSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/BarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/AreaChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/AxisRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/LineSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/PieChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/BubbleSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/PlotChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/CandlestickChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/charts-3.0.0.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/HLOCChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/LineChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/charts/src/mx/charts/series/BarSeries.as</path>

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

--- frameworks/projects/charts/src/mx/charts/PieChart.as
+++ frameworks/projects/charts/src/mx/charts/PieChart.as
@@ -18,11 +18,12 @@
 import mx.charts.chartClasses.Series;
 import mx.charts.series.PieSeries;
 import mx.charts.styles.HaloDefaults;
+import mx.core.IFlexModuleFactory;
+import mx.core.mx_internal;
 import mx.graphics.SolidColor;
+import mx.graphics.SolidColorStroke;
 import mx.graphics.Stroke;
 import mx.styles.CSSStyleDeclaration;
-import mx.core.IFlexModuleFactory;
-import mx.core.mx_internal;

 use namespace mx_internal;

@@ -181,20 +182,11 @@
     private function initStyles():Boolean
     {
         HaloDefaults.init(styleManager);
-
-        var pieChartStyle:CSSStyleDeclaration =
-            HaloDefaults.createSelector("mx.charts.PieChart", styleManager);
-
-        pieChartStyle.defaultFactory = function():void
-        {
-            this.dataTipRenderer = DataTip;
-            this.fill = new SolidColor(0xFFFFFF, 0);
-            this.calloutStroke = new Stroke(0x888888,2);
-            this.fontSize = 10;
-            this.innerRadius = 0;
-            this.textAlign = "left";
-        }
-
+
+		var pieChartStyle:CSSStyleDeclaration = styleManager.getStyleDeclaration("mx.charts.PieChart");
+		pieChartStyle.setStyle("fill", new SolidColor(0xFFFFFF, 0));
+		pieChartStyle.setStyle("calloutStroke", new SolidColorStroke(0x888888,2));
+
         return true;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 17513
Author:   cframpto@adobe.com
Date:     2010-08-30T18:36:10.517222Z

Log Message:
-----------
Moved the typicalText getter and setter from TextInput/TextArea to SkinnableTextBase.  The reason widthInChars is in both classes is so the asdoc could be different – TextInput has widthInChars set to 10 in the skin which is not the default.  Fixed a comment, alphabetized the new TYPICAL_TEXT_PROPERTY_FLAG and remove an unused property.

QE notes:
Doc notes:
Bugs: tweak SDK-26180
Reviewer: Alex
Tests run: cyclone - checkin, mustella
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -2336,7 +2336,7 @@
          *
          *
Since both widthInChars and heightInLines
          *  default to NaN, RichTextEditable "autosizes" by default:
-         *  it starts out very samll if it has no text, grows in width as you
+         *  it starts out very small if it has no text, grows in width as you
          *  type, and grows in height when you press Enter to start a new line.

          *
          *  @default NaN


Transferred from the Adobe Open Source Subversion Repository

Revision: 4648
Author:   cframpto@adobe.com
Date:     2009-01-23T22:33:27.321165Z

Log Message:
-----------
If text and content are both set on TextGraphic or TextView, content takes precedence. Content can then be set to null to allow text to take precedence.

If there is no text in TextGraphic or TextView should still be able to enter text.  Set contentChanged when original empty textFlow is created to make sure a flowComposer is allocated in updateDisplayList().

QE Notes:
Doc Notes:
Bugs: SDK-17307, SDK-16893
Reviewers: will be Gordan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -198,7 +198,11 @@
         super();

         _content = textFlow = createEmptyTextFlow();
-
+
+        // Even if no text/content specified, want to have a flow composer
+        // so text can be input if the control is editable.
+        contentChanged = true;
+
         mx_internal::undoManager.undoAndRedoItemLimit = int.MAX_VALUE;

         addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
@@ -380,6 +384,14 @@
     private var contentChanged:Boolean = false;

     /**
+     *  @private
+     *  If content is explicitly set, it will take precedence over text, if it
+     *  is set as well.  Once content is set, it can be set to null and then text
+     *  can be set.
+     */
+    private var contentSet:Boolean = false;
+
+    /**
      *  Documentation is not currently available.
      */
     public function get content():Object
@@ -403,6 +415,10 @@

         _content = value;
         contentChanged = true;
+
+        // True, if content is non-null.  Once content is set, if then set
+        // to null, text can be set.
+        contentSet = _content;

         invalidateSize();
         invalidateDisplayList();
@@ -952,14 +968,17 @@
         // Setting 'text' temporarily causes 'content' to become null.
         // Later, after the 'text' has been committed into the TextFlow,
         // getting 'content' will return the TextFlow.
-        _content = null;
-        contentChanged = false;
-
-        _text = value;
-        textChanged = true;
-
-        invalidateSize();
-        invalidateDisplayList();
+        if (!contentSet)
+        {
+            _content = null;
+            contentChanged = false;
+
+            _text = value;
+            textChanged = true;
+
+            invalidateSize();
+            invalidateDisplayList();
+        }
     }

     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

--- frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/ColumnSeriesAutomationImpl.as
+++ frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/ColumnSeriesAutomationImpl.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 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.automation.delegates.charts
 {


limiting automatic selectable attribute discovery to plotters

--- WeaveUI/src/weave/visualization/tools/SimpleVisTool.as
+++ WeaveUI/src/weave/visualization/tools/SimpleVisTool.as
@@ -176,7 +176,7 @@
 			if (obj)
 				return obj.getSelectableAttributeNames();

-			var descendants:Array = getLinkableDescendants(this, ISelectableAttributes);
+			var descendants:Array = visualization.plotManager.plotters.getObjects(ISelectableAttributes);
 			return [].concat.apply(null, descendants.map(function(descendant:ISelectableAttributes, i:int, a:Array):Array {
 				var owner:ILinkableHashMap = getLinkableOwner(descendant);
 				if (!owner)
@@ -203,7 +203,7 @@
 			if (obj)
 				return obj.getSelectableAttributes();

-			var descendants:Array = getLinkableDescendants(this, ISelectableAttributes);
+			var descendants:Array = visualization.plotManager.plotters.getObjects(ISelectableAttributes);
 			return [].concat.apply(null, descendants.map(function(descendant:ISelectableAttributes, i:int, a:Array):Array {
 				return descendant.getSelectableAttributes();
 			}));