AJS-27 - Minor changes

AJS-27 - Minor changes

--- org.openwms.core/org.openwms.core.domain.as/src/main/flex/org/openwms/core/domain/system/usermanagement/User.as
+++ org.openwms.core/org.openwms.core.domain.as/src/main/flex/org/openwms/core/domain/system/usermanagement/User.as
@@ -65,7 +65,7 @@
          *
          * @param value The password
          */
-        override public function set password(value : String) : void {
+        public function set password(value : String) : void {
             ;
         }


Some improvements as per Ray's suggestion

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

--- src/as/com/threerings/util/EmbededClassLoader.as
+++ src/as/com/threerings/util/EmbededClassLoader.as
@@ -1,6 +1,7 @@
 package com.threerings.util {

 import flash.display.Loader;
+import flash.display.LoaderInfo;
 import flash.errors.IllegalOperationError;
 import flash.events.Event;
 import flash.events.EventDispatcher;
@@ -12,12 +13,13 @@
 /**
  * Allows you to load an embeded SWF stored as a Byte Array then access any stored classes
  * within the SWF.
+ *
+ * An Event.COMPLETE will be dispatched upon the successful completion of a call to
+ * {@link load}.  IOErrorEvent.IO_ERROR will be dispatched if there's a problem reading the
+ * ByteArray.
  */
 public class EmbededClassLoader extends EventDispatcher
 {
-    public static var SWF_LOADED :String = "swfLoaded";
-    public static var LOAD_ERROR :String = "loadError";
-
     public function EmbededClassLoader ()
     {
         _loader = new Loader();
@@ -44,38 +46,69 @@
      */
     public function getClass (className :String) :Class
     {
-        if (_loader.contentLoaderInfo.bytesLoaded != _loader.contentLoaderInfo.bytesTotal) {
+        return getSymbol(className) as Class;
+    }
+
+    /**
+     * Retrieves a Function definition from the loaded swf.
+     *
+     * @throws IllegalOperationError when the swf has not completed loading or the class does
+     * not exist
+     */
+    public function getFunction (functionName :String) :Function
+    {
+        return getSymbol(functionName) as Function;
+    }
+
+    /**
+     * Retrieves a symbol definition from the loaded swf.
+     *
+     * @throws IllegalOperationError when the swf has not completed loading or the class does
+     * not exist
+     */
+    public function getSymbol (symbolName :String) :Object
+    {
+        if (!checkLoaded()) {
             throw new IllegalOperationError("SWF has not completed loading");
         }
         try {
-            return _loader.contentLoaderInfo.applicationDomain.getDefinition(className) as Class;
+            return _loader.contentLoaderInfo.applicationDomain.getDefinition(symbolName);
         } catch (e: Error) {
-            throw new IllegalOperationError(className + " definition not found");
+            throw new IllegalOperationError(symbolName + " definition not found");
         }
         return null;
     }

     /**
-     * Checks if a class exists in the library.
+     * Checks if a symbol exists in the library.
      *
      * @throws IllegalOperationError when the swf has not completed loading.
      */
-    public function isClass (className :String) :Boolean
+    public function isSymbol (className :String) :Boolean
     {
-        if (_loader.contentLoaderInfo.bytesLoaded != _loader.contentLoaderInfo.bytesTotal) {
+        if (!checkLoaded()) {
             throw new IllegalOperationError("SWF has not completed loading");
         }
         return _loader.contentLoaderInfo.applicationDomain.hasDefinition(className);
     }

+    /**
+     * Returns true if we've completed loaded the swf.
+     */
+    protected function checkLoaded () :Boolean
+    {
+        var loaderInfo :LoaderInfo = _loader.contentLoaderInfo;
+        return !(loaderInfo.bytesTotal == 0 || loaderInfo.bytesLoaded != loaderInfo.bytesTotal);
+    }
+
     protected function completeHandler (e :Event) :void
     {
-        dispatchEvent(new Event(SWF_LOADED));
+        dispatchEvent(e);
     }

-    protected function ioErrorHandler (E :Event) :void
+    protected function ioErrorHandler (e :Event) :void
     {
-        dispatchEvent(new Event(LOAD_ERROR));
+        dispatchEvent(e);
     }

     protected var _loader :Loader;


Timer Class correction and accuracy.

Timer Class correction and accuracy.

Timer class corrected to match Flash version.  However, this version is more accurate and will keep track of the elapsed time to continue the remainder when started after a pause.

--- src/flash/utils/Timer.as
+++ src/flash/utils/Timer.as
@@ -1,114 +1,244 @@
 package flash.utils
 {
-	import flash.events.*;
-
-	[Event(name = "timerComplete", type = "flash.events.TimerEvent")]
-	[Event(name = "timer", type = "flash.events.TimerEvent")]
+	import flash.events.EventDispatcher;
+	import flash.events.TimerEvent;
+
+	/**
+	 * Dispatched whenever it has completed the number of requests set by Timer.repeatCount.
+	 * @eventType	flash.events.TimerEvent.TIMER_COMPLETE
+	 */
+	[Event(name="timerComplete", type="flash.events.TimerEvent")]
+
+	/**
+	 * Dispatched whenever a Timer object reaches an interval specified according to the Timer.delay property.
+	 * @eventType	flash.events.TimerEvent.TIMER
+	 */
+	[Event(name="timer", type="flash.events.TimerEvent")]
+
+	/**
+	 * The Timer class is the interface to timers, which let you
+	 * run code on a specified time sequence. Use the <codeph class="+ topic/ph pr-d/codeph ">start()</codeph> method to start a timer.
+	 * Add an event listener for the <codeph class="+ topic/ph pr-d/codeph ">timer</codeph> event to set up code to be run on the timer interval.
+	 *
+	 *
You can create Timer objects to run once or repeat at specified intervals to execute code on a schedule.
+	 *
+	 *   <ph class="- topic/ph ">Depending on the SWF file's framerate or the runtime environment (available
+	 * memory and other factors), the runtime may dispatch events at slightly
+	 * offset intervals. For example, if a SWF file is set to play at 10 frames per second (fps), which is 100 millisecond
+	 * intervals, but your timer is set to fire an event at 80 milliseconds, the event will be dispatched close to the
+	 * 100 millisecond interval.</ph>
+	 *
+	 *   Memory-intensive scripts may also offset the events.

+	 *
+	 *   EXAMPLE:
+	 *
+	 *   The following example uses the class <codeph class="+ topic/ph pr-d/codeph ">TimerExample</codeph> to show how a
+	 * listener method <codeph class="+ topic/ph pr-d/codeph ">timerHandler()</codeph> can be set to listen for a new TimerEvent
+	 * to be dispatched. The timer is started when <codeph class="+ topic/ph pr-d/codeph ">start()</codeph> is called, and after that point,
+	 * the timer events are dispatched.
+	 * <codeblock xml:space="preserve" class="+ topic/pre pr-d/codeblock ">
+	 * package {
+	 * import flash.utils.Timer;
+	 * import flash.events.TimerEvent;
+	 * import flash.display.Sprite;
+	 *
+	 *   public class TimerExample extends Sprite {
+	 *
+	 *   public function TimerExample() {
+	 * var myTimer:Timer = new Timer(1000, 2);
+	 * myTimer.addEventListener("timer", timerHandler);
+	 * myTimer.start();
+	 * }
+	 *
+	 *   public function timerHandler(event:TimerEvent):void {
+	 * trace("timerHandler: " + event);
+	 * }
+	 * }
+	 * }
+	 * </codeblock>
+	 * @langversion	3.0
+	 * @playerversion	Flash 9
+	 * @playerversion	Lite 4
+	 */
 	public class Timer extends EventDispatcher
 	{
-
-		private var m_delay:Number;
-
-		private var m_repeatCount:int;
-
-		private var m_iteration:int;
-		private var intervalID:int;
-		public function Timer(delay:Number, repeatCount:int = 0)
-		{
-			super();
-			if (delay < 0 || !isFinite(delay))
+		private var _delay:Number;
+		private var _repeatCount:int = 0;
+		private var _startTime:Number = 0;
+		private var _stopTime:Number = 0;
+		private var _delayTime:Number = 0;
+		private var _interval:Number;
+		private var _running:Boolean = false;
+		private var _currentCount:int = 0;
+		private var _complete:Boolean = false;
+
+		/**
+		 * The total number of times the timer has fired since it started
+		 * at zero. If the timer has been reset, only the fires since
+		 * the reset are counted.
+		 * @langversion	3.0
+		 * @playerversion	Flash 9
+		 * @playerversion	Lite 4
+		 */
+		public function get currentCount():int
+		{
+			return _currentCount;
+		}
+
+		/**
+		 * The delay, in milliseconds, between timer
+		 * events. If you set the delay interval while
+		 * the timer is running, the timer will restart
+		 * at the same repeatCount iteration.
+		 * Note: A delay lower than 20 milliseconds is not recommended. Timer frequency
+		 * is limited to 60 frames per second, meaning a delay lower than 16.6 milliseconds causes runtime problems.
+		 * @langversion	3.0
+		 * @playerversion	Flash 9
+		 * @playerversion	Lite 4
+		 * @throws	Error Throws an exception if the delay specified is negative or not a finite number.
+		 */
+		public function get delay():Number
+		{
+			return _delay;
+		}
+
+		public function set delay (value:Number):void
+		{
+			if (value < 0 || !isFinite(value)) Error.throwError(RangeError, 2066);
+
+			_delay = value;
+
+			if (_running)
 			{
-				Error.throwError(RangeError, 2066);
+				var count:int = _currentCount;
+				reset();
+				_currentCount = count;
+				start();
 			}
-			this.m_delay = delay;
-			this.m_repeatCount = repeatCount;
-			this.m_iteration = 0;
-		}
-
-		public function get delay():Number
-		{
-			return this.m_delay;
-		}
-
+		}
+
+		/**
+		 * The total number of times the timer is set to run.
+		 * If the repeat count is set to 0, the timer continues forever
+		 * or until the stop() method is invoked or the program stops.
+		 * If the repeat count is nonzero, the timer runs the specified number of times.
+		 * If repeatCount is set to a total that is the same or less then currentCount
+		 * the timer stops and will not fire again.
+		 * @langversion	3.0
+		 * @playerversion	Flash 9
+		 * @playerversion	Lite 4
+		 */
 		public function get repeatCount():int
 		{
-			return this.m_repeatCount;
+			return _repeatCount;
 		}

 		public function set repeatCount(value:int):void
 		{
-			this.m_repeatCount = value;
-			if (this.running && this.m_repeatCount != 0 && this.m_iteration >= this.m_repeatCount)
+			_repeatCount = value;
+
+			if (_running)
 			{
-				this.stop();
+				reset();
+				start();
 			}
 		}
-
-		public function get currentCount():int
-		{
-			return this.m_iteration;
-		}
-
+
+		/**
+		 * The timer's current state; true if the timer is running, otherwise false.
+		 * @langversion	3.0
+		 * @playerversion	Flash 9
+		 * @playerversion	Lite 4
+		 */
 		public function get running():Boolean
 		{
-			return false;
-		}
-
-		public function set delay(value:Number):void
-		{
-			if (value < 0 || !isFinite(value))
+			return _running;
+		}
+
+		/**
+		 * Stops the timer, if it is running, and sets the currentCount property back to 0,
+		 * like the reset button of a stopwatch. Then, when start() is called,
+		 * the timer instance runs for the specified number of repetitions,
+		 * as set by the repeatCount value.
+		 * @langversion	3.0
+		 * @playerversion	Flash 9
+		 * @playerversion	Lite 4
+		 */
+		public function reset():void
+		{
+			clearInterval(_interval);
+			_delayTime = _delay;
+			_running = false;
+			_complete = false;
+			_currentCount = 0;
+		}
+
+		/**
+		 * Starts the timer, if it is not already running.
+		 * @langversion	3.0
+		 * @playerversion	Flash 9
+		 * @playerversion	Lite 4
+		 */
+		public function start():void
+		{
+			_startTime = new Date().getMilliseconds();
+			_interval = setInterval(timerComplete, _delayTime);
+			_running = true;
+		}
+
+		/**
+		 * Stops the timer. When start() is called after stop(), the timer
+		 * instance runs for the remaining number of repetitions, as set by the repeatCount property.
+		 * @langversion	3.0
+		 * @playerversion	Flash 9
+		 * @playerversion	Lite 4
+		 */
+		public function stop():void
+		{
+			clearInterval(_interval);
+			_stopTime = new Date().getMilliseconds();
+			_delayTime -= (_stopTime - _startTime);
+			_running = false;
+		}
+
+		private function timerComplete():void
+		{
+			//trace("Timer.timerComplete()");
+			_delayTime = _delay;
+			dispatchEvent(new TimerEvent(TimerEvent.TIMER));
+			if (!_complete || _repeatCount > _currentCount)
 			{
-				Error.throwError(RangeError, 2066);
+				_complete = true;
+				if (_repeatCount > 0) _currentCount++;
+				dispatchEvent(new TimerEvent(TimerEvent.TIMER_COMPLETE));
 			}
-			this.m_delay = value;
-			if (this.running)
-			{
-				this.stop();
-				this.start();
-			}
-		}
-
-		private function tick():void
-		{
-			this.m_iteration++;
-			this._timerDispatch();
-			if (this.m_repeatCount != 0 && this.m_iteration >= this.m_repeatCount)
-			{
-				this.stop();
-				dispatchEvent(new TimerEvent(TimerEvent.TIMER_COMPLETE, false, false));
-			}
-		}
-
-		public function start():void
-		{
-			if (!this.running)
-			{
-				this._start(this.m_delay, this.tick);
-			}
-		}
-
-		public function reset():void
-		{
-			if (this.running)
-			{
-				this.stop();
-			}
-			this.m_iteration = 0;
-		}
-
-		private function _start(m_delay:Number, m_tick:Function):void
-		{
-			intervalID=setInterval(m_tick, m_delay);
-		}
-
-		private function _timerDispatch():void
-		{
-			dispatchEvent(new TimerEvent(TimerEvent.TIMER));
-		}
-
-		public function stop():void
-		{
-			clearInterval(intervalID);
+
+			if (_repeatCount > 0 && _repeatCount == _currentCount) reset();
+		}
+
+		/**
+		 * Constructs a new Timer object with the specified delay
+		 * and repeatCount states.
+		 *
+		 *   The timer does not start automatically; you must call the start() method
+		 * to start it.
+		 * @param	delay	The delay between timer events, in milliseconds. A delay lower than 20 milliseconds is not recommended. Timer frequency
+		 *   is limited to 60 frames per second, meaning a delay lower than 16.6 milliseconds causes runtime problems.
+		 * @param	repeatCount	Specifies the number of repetitions.
+		 *   If zero, the timer repeats infinitely.
+		 *   If nonzero, the timer runs the specified number of times and then stops.
+		 * @langversion	3.0
+		 * @playerversion	Flash 9
+		 * @playerversion	Lite 4
+		 * @throws	Error if the delay specified is negative or not a finite number
+		 */
+		public function Timer (delay:Number, repeatCount:int = 0)
+		{
+			if (delay < 0 || !isFinite(delay)) Error.throwError(RangeError, 2066);
+
+			_delay = delay;
+			_delayTime = delay;
+			_repeatCount = repeatCount;
 		}
 	}
-}
+}


Bug 1170740 - Fix signatures of LocalConnection#allow(Insecure)Domain

--- src/flash/net/LocalConnection.as
+++ src/flash/net/LocalConnection.as
@@ -29,7 +29,7 @@
   public native function set client(client:Object):void;
   public native function get isPerUser():Boolean;
   public native function set isPerUser(newValue:Boolean):void;
-  public native function allowDomain():void;
-  public native function allowInsecureDomain():void;
+  public native function allowDomain(...domains):void;
+  public native function allowInsecureDomain(...domains):void;
 }
 }


QKeyManager.getQKeysAsync() is no longer using QKeyGetter's .then()

--- WeaveASJS/src/weavejs/data/key/QKeyManager.as
+++ WeaveASJS/src/weavejs/data/key/QKeyManager.as
@@ -199,9 +199,7 @@
 			var qkg:QKeyGetter = map_context_qkeyGetter.get(relevantContext);
 			if (!qkg)
 				map_context_qkeyGetter.set(relevantContext, qkg = new QKeyGetter(this, relevantContext));
-			var promise:WeavePromise = qkg.asyncStart(keyType, keyStrings, outputKeys);
-			if (asyncCallback != null)
-				promise.then(asyncCallback);
+			qkg.asyncStart(keyType, keyStrings, outputKeys, asyncCallback);
 		}

 		/**
@@ -268,11 +266,12 @@
 		this.manager = manager;
 	}

-	public function asyncStart(keyType:String, keyStrings:Array/*/<string>/*/, outputKeys:Array/*/<weavejs.api.data.IQualifiedKey>/*/ = null):QKeyGetter
+	public function asyncStart(keyType:String, keyStrings:Array/*/<string>/*/, outputKeys:Array/*/<weavejs.api.data.IQualifiedKey>/*/ = null, asyncCallback:Function = null):QKeyGetter
 	{
 		if (!keyStrings)
 			keyStrings = [];
 		this.manager = manager;
+		this.asyncCallback = asyncCallback;
 		this.keyType = keyType;
 		this.keyStrings = keyStrings;
 		this.i = 0;
@@ -308,5 +307,11 @@
 	private function asyncComplete():void
 	{
 		setResult(this.outputKeys);
+
+		if (this.asyncCallback)
+		{
+			this.asyncCallback.call(this.relevantContext, this.outputKeys);
+			this.asyncCallback = null;
+		}
 	}
 }


Beware of subprocess failures.

Beware of subprocess failures.

	* build-aux/urbi.as (spawn_urbi_server): Run the bc call outside
	the "case" clause to let set -e do its job.

--- build-aux/urbi.as
+++ build-aux/urbi.as
@@ -165,12 +165,15 @@
   local t=0
   local tmax=8
   local dt=.5
+  # 0 if we stop, 1 to continue sleeping.
+  local cont
   while children_alive server &&
           { test ! -f server.port ||
             test $(wc -l <server.port) = 0; };
   do
     # test/expr don't like floating points.
-    case $(echo "$t <= $tmax" | bc) in
+    cont=$(echo "$t <= $tmax" | bc)
+    case $cont in
       (1) sleep $dt
           t=$(echo "$t + $dt" | bc);;
       (0)


improve performance and readability of Base64.as

--- src/org/hola/Base64.as
+++ src/org/hola/Base64.as
@@ -1,74 +1,69 @@
 package org.hola
 {
-   import flash.utils.ByteArray;
-
-   public class Base64 extends Object
-   {
-
-      private static const _decodeChars:Vector.<int> = InitDecodeChar();
-
-      public function Base64()
-      {
-         super();
-      }
-
-      public static function decode(param1:String) : ByteArray
-      {
-         var _loc2_:* = 0;
-         var _loc3_:* = 0;
-         var _loc4_:* = 0;
-         var _loc5_:* = 0;
-         var _loc6_:* = 0;
-         var _loc7_:int = param1.length;
-         var _loc8_:ByteArray = new ByteArray();
-         _loc8_.writeUTFBytes(param1);
-         var _loc9_:* = 0;
-         while(_loc6_ < _loc7_)
-         {
-            _loc2_ = _decodeChars[int(_loc8_[_loc6_++])];
-            if(_loc2_ == -1)
+    import flash.utils.ByteArray;
+
+    public class Base64 extends Object
+    {
+        private static const _decodeChars:Vector.<int> = InitDecodeChar();
+
+        public static function decode(str : String) : ByteArray {
+            var c1 : int;
+            var c2 : int;
+            var c3 : int;
+            var c4 : int;
+            var i : int = 0;
+            var len : int = str.length;
+            var arr : ByteArray = new ByteArray();
+            arr.length = len/4*3;
+            var pos : int = 0;
+            while (i<len)
             {
-               break;
+                c1 = _decodeChars[int(str.charCodeAt(i++))];
+                if (c1 == -1)
+                    break;
+                c2 = _decodeChars[int(str.charCodeAt(i++))];
+                if (c2 == -1)
+                    break;
+                arr[int(pos++)] = (c1 << 2) | ((c2 & 0x30) >> 4);
+                c3 = int(str.charCodeAt(i++));
+                if (c3 == 61)
+                    break;
+                c3 = _decodeChars[int(c3)];
+                if (c3 == -1)
+                    break;
+                arr[int(pos++)] = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2);
+                c4 = int(str.charCodeAt(i++));
+                if (c4 == 61)
+                    break;
+                c4 = _decodeChars[int(c4)];
+                if (c4 == -1)
+                    break;
+                arr[int(pos++)] = ((c3 & 0x03) << 6) | c4;
             }
-            _loc3_ = _decodeChars[int(_loc8_[_loc6_++])];
-            if(_loc3_ == -1)
-            {
-               break;
-            }
-            _loc8_[int(_loc9_++)] = _loc2_ << 2 | (_loc3_ & 48) >> 4;
-            _loc4_ = _loc8_[int(_loc6_++)];
-            if(_loc4_ == 61)
-            {
-               _loc8_.length = _loc9_;
-               return _loc8_;
-            }
-            _loc4_ = _decodeChars[int(_loc4_)];
-            if(_loc4_ == -1)
-            {
-               break;
-            }
-            _loc8_[int(_loc9_++)] = (_loc3_ & 15) << 4 | (_loc4_ & 60) >> 2;
-            _loc5_ = _loc8_[int(_loc6_++)];
-            if(_loc5_ == 61)
-            {
-               _loc8_.length = _loc9_;
-               return _loc8_;
-            }
-            _loc5_ = _decodeChars[int(_loc5_)];
-            if(_loc5_ == -1)
-            {
-               break;
-            }
-            _loc8_[int(_loc9_++)] = (_loc4_ & 3) << 6 | _loc5_;
-         }
-         _loc8_.length = _loc9_;
-         return _loc8_;
-      }
-
-      public static function InitDecodeChar() : Vector.<int>
-      {
-         var _loc1_:Vector.<int> = new <int>[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];
-         return _loc1_;
-      }
-   }
+            arr.length = pos;
+            return arr;
+        }
+
+        public static function InitDecodeChar() : Vector.<int>
+        {
+            var decodeChars : Vector.<int> = new <int>[
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
+                52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
+                -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
+                15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
+                -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+                41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+                -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
+            return decodeChars;
+        }
+    }
 }


Apache license 2.0 added.

Apache license 2.0 added.

--- tui_flashdevelop3/lib/touchAll/piano/PianoKey.as
+++ tui_flashdevelop3/lib/touchAll/piano/PianoKey.as
@@ -1,3 +1,15 @@
+/********************************************************/
+/*  Copyright © YoAmbulante (alex.nino@yoambulante.com) */
+/*                                                      */
+/*  You may modify or sell this code, you can do        */
+/*  whatever you want with it, I don't mind. Just don't */
+/*  forget to contribute with a beer thru the website.  */
+/*                                                      */
+/*  Visit http://www.yoambulante.com to clarify any     */
+/*  doubt about this code. Note that donators have      */
+/*  priority on information enquiries.                  */
+/*                                                      */
+/********************************************************/
 package touchAll.piano
 {
 	import flash.display.GradientType;


fixed missed reference to new AlignerManifest class

--- src/Empty.as
+++ src/Empty.as
@@ -1,6 +1,6 @@
 package  {
 	import flash.display.Sprite;
-	import ktu.utils.align.aligners.MethodManifest;
+	import ktu.utils.align.aligners.AlignerManifest;
 	import ktu.utils.align.RectangleAlignment;
 	import ktu.utils.align.VizAlign;
 	import ktu.utils.align.VizAlignGroup;
@@ -18,7 +18,7 @@
 		VizAlignGroup;
 		RectangleAlignment;

-		MethodManifest;
+		AlignerManifest;

 		public function Empty(){


Fix grey bitrate transition scenario.

Fix grey bitrate transition scenario.

--- HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
+++ HLSPlugin/src/org/osmf/net/httpstreaming/HLSHTTPNetStream.as
@@ -2463,6 +2463,21 @@

 		static protected function pendingSortCallback(a:FLVTag, b:FLVTag):int
 		{
+			if(a.timestamp == b.timestamp)
+			{
+				var vTagA:FLVTagVideo = a as FLVTagVideo;
+				var vTagB:FLVTagVideo = b as FLVTagVideo;
+
+				if(vTagA && vTagB)
+				{
+					// Both video tags at same time - make sure SPS/PPS comes first.
+					if(vTagA.isAVCC && !vTagB.isAVCC)
+						return -1;
+					else if(!vTagA.isAVCC && vTagB.isAVCC)
+						return 1;
+				}
+			}
+
 			return a.timestamp - b.timestamp;
 		}


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

--- frameworks/projects/automation_dmv/src/mx/automation/delegates/advancedDataGrid/AdvancedDataGridBaseExAutomationImpl.as
+++ frameworks/projects/automation_dmv/src/mx/automation/delegates/advancedDataGrid/AdvancedDataGridBaseExAutomationImpl.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.advancedDataGrid
 {


Fixed Effect3DStyle.get where styleName was mispelled as "name"

--- src/aerys/minko/effect/Effect3DStyle.as
+++ src/aerys/minko/effect/Effect3DStyle.as
@@ -48,7 +48,8 @@
 				return value;

 			if (defaultValue === undefined)
-				throw new Error("Unable to read style " + name + " and no default value was provided.");
+				throw new Error("Unable to read style '" + styleName
+								+ "' and no default value was provided.");

 			return defaultValue;
 		}


Dictionary is in the docs, but the compiler doesn't seem to know about it
yet. Rolled back (nearly, I fixed a small bug).

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

--- src/as/com/threerings/util/SimpleMap.as
+++ src/as/com/threerings/util/SimpleMap.as
@@ -1,6 +1,4 @@
 package com.threerings.util {
-
-import flash.util.Dictionary;

 /**
  * I will likely extend this out to be a fully-featured map.
@@ -9,28 +7,30 @@
 {
     public function clear () :void
     {
-        _data = new Dictionary();
+        _data = new Object();
         _size = 0;
     }

     public function get (key :Object) :Object
     {
-        return _data[key];
+        var skey :String = key.toString();
+        return _data[skey];
     }

     public function keys () :Array
     {
         var arr :Array = new Array();
-        for (var key :Object in _data) {
-            arr.push(key);
+        for (var skey :String in _data) {
+            arr.push(skey);
         }
         return arr;
     }

     public function put (key :Object, value :Object) :Object
     {
-        var oldValue :* = _data[key];
-        _data[key] = value;
+        var skey :String = key.toString();
+        var oldValue :* = _data[skey];
+        _data[skey] = value;
         if (oldValue === undefined) {
             _size++;
         }
@@ -39,12 +39,11 @@

     public function remove (key :Object) :Object
     {
-        var value :* = _data[key];
-        if (value !== undefined) {
-            delete _data[key];
-            _size--;
-        }
-        return (value as Object);
+        var skey :String = key.toString();
+        var value :Object = _data[skey];
+        delete _data[skey];
+        _size--;
+        return value;
     }

     public function size () :int
@@ -52,7 +51,7 @@
         return _size;
     }

-    protected var _data :Dictionary = new Dictionary();
+    protected var _data :Object = new Object();

     protected var _size :int = 0;
 }


-fix creating extension (add listener in init and after init add nativeapplication listeners)

--- actionscript/src/com/freshplanet/ane/AirFacebook/Facebook.as
+++ actionscript/src/com/freshplanet/ane/AirFacebook/Facebook.as
@@ -52,11 +52,6 @@
                 log("ERROR - Extension context is null. Please check if extension.xml is setup correctly.");
                 return;
             }
-            _context.addEventListener(StatusEvent.STATUS, onStatus);
-
-            NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);
-            NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, onActivate);
-            NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivate);

             _instance = this;
         }
@@ -106,10 +101,16 @@
     {
         if (isSupported && _context != null) {

-            _context.call("setNativeLogEnabled", Facebook.nativeLogEnabled);
-            log("ANE Facebook version: " + VERSION);
-            // iOS is synchronous but we will simulate async to have consistent API
-            _context.call("initFacebook", appID, getNewCallbackName(onInitialized));
+            if(!_initialized){
+                _context.addEventListener(StatusEvent.STATUS, onStatus);
+
+                _context.call("setNativeLogEnabled", Facebook.nativeLogEnabled);
+                log("ANE Facebook version: " + VERSION);
+                // iOS is synchronous but we will simulate async to have consistent API
+                _context.call("initFacebook", appID, getNewCallbackName(onInitialized));
+            } else {
+                log("Already initialized!");
+            }
         } else {

             log("Can't initialize extension! Unsupported platform or context couldn't be created!")
@@ -536,6 +537,10 @@

             _initialized = true;

+            NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);
+            NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, onActivate);
+            NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivate);
+
             dataArr = event.code.split("_");
             if (dataArr.length == 2) {
                 callbackName = dataArr[1];


Transferred from the Adobe Open Source Subversion Repository

Revision: 9857
Author:   jimurphy@adobe.com
Date:     2009-09-01T01:02:58.854673Z

Log Message:
-----------
Merged 3.x revisions 9543,9658,9748,9837 -> trunk

checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/OrderedProperties.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>

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

--- frameworks/projects/framework/src/mx/preloaders/Preloader.as
+++ frameworks/projects/framework/src/mx/preloaders/Preloader.as
@@ -398,7 +398,7 @@
 		rslEvent.isResourceModule = (rslListLoader == resourceModuleListLoader);
 		rslEvent.bytesLoaded = item.total;
 		rslEvent.bytesTotal = item.total;
-        rslEvent.loaderInfo = LoaderInfo(event.target);
+        rslEvent.loaderInfo = event.target as LoaderInfo;
         rslEvent.rslIndex = index;
 		rslEvent.rslTotal = rslListLoader.getItemCount();
 		rslEvent.url = item.urlRequest;


Transferred from the Adobe Open Source Subversion Repository

Revision: 17822
Author:   egeorgie@adobe.com
Date:     2010-09-23T19:10:16.481689Z

Log Message:
-----------
Fix SDK-22368 A baseline alignment should be added to HorizontalLayout

In this change:
- add new properties to HGroup, HorizontalLayout - alignmentBaseline and actualAlignmentBaseline

QE notes:  Ready for testing, names could change after PARB
Doc notes: None
Bugs: SDK-22368
Reviewer: Hans
Tests run: full cyclone
Is noteworthy for integration: No

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/layouts/VerticalAlign.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalAlign.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalAlign.as
@@ -16,7 +16,7 @@
  *  The VerticalAlign class defines the possible values for the
  *  verticalAlign property of the HorizontalLayout class.
  *
- * @see HorizontalLayout#verticalAlign
+ *  @see HorizontalLayout#verticalAlign
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -81,6 +81,16 @@
      */
     public static const CONTENT_JUSTIFY:String = "contentJustify";

+    /**
+     *  Vertically position the children so that their text is
+     *  aligned to the base line of the container.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public static const BASELINE:String = "baseline";
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2874
Author:   chaase@adobe.com
Date:     2008-08-18T22:17:29.530733Z

Log Message:
-----------
Added Power and Sine easing classes to manifest and Flex4Classes.as - this was causing a problem building flex4tests because some of the new effects tests were referencing classes that had to be explicitly linked into the flex4 swc.

Reviewer: Jason S.
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>

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

--- frameworks/projects/spark/src/SparkClasses.as
+++ frameworks/projects/spark/src/SparkClasses.as
@@ -23,6 +23,8 @@
  *  For example, Button does not have a reference to ButtonSkin,
  *  but ButtonSkin needs to be in framework.swc along with Button.
  */
+import flex.effects.easing.Constant;
+import flex.effects.easing.Power;
 import flex.skin.ApplicationSkin; ApplicationSkin;
 import flex.graphics.Parser; Parser;
 import flex.skin.ButtonSkin; ButtonSkin;


fixed int return type in AS2.

fixed int return type in AS2.


added type restriction to WeaveProperties.externalTools

--- WeaveUISpark/src/weave/WeaveProperties.as
+++ WeaveUISpark/src/weave/WeaveProperties.as
@@ -442,7 +442,7 @@
 		public const rServiceURL:LinkableString = registerLinkableChild(this, new LinkableString("/WeaveServices/RService"), handleRServiceURLChange);// url of Weave R service using Rserve
 		public const pdbServiceURL:LinkableString = new LinkableString("/WeavePDBService/PDBService");

-		public const externalTools:LinkableHashMap = registerLinkableChild(this, new LinkableHashMap());
+		public const externalTools:LinkableHashMap = registerLinkableChild(this, new LinkableHashMap(LinkableString));

 		private function handleRServiceURLChange():void
 		{


Fix another NPE. r=Armando

Fix another NPE. r=Armando

--- src/org/jivesoftware/xiff/core/AbstractJID.as
+++ src/org/jivesoftware/xiff/core/AbstractJID.as
@@ -21,8 +21,7 @@
    			var slashIndex:int = inJID.lastIndexOf("/");
    			if(slashIndex >= 0)
    				_resource = inJID.substring(slashIndex + 1);
-   			if(separatorIndex >= 0)
-   				_domain = inJID.substring(separatorIndex + 1, slashIndex >= 0 ? slashIndex : inJID.length);
+   			_domain = inJID.substring(separatorIndex + 1, slashIndex >= 0 ? slashIndex : inJID.length);
    			if(separatorIndex >= 1)
    				_node = inJID.substring(0, separatorIndex);
 		}


segment buffering support added

segment buffering support added

new flashvar has been added to Kplayer configuration - hlsSegmentBuffer
Player will pass this flashvar as segmentBuffer directly to
KalturaHLSPlugin.
If so, the value will be passed to HLSManifestParser.MAX_SEG_BUFFER

--- KalturaHLSPlugin/src/KalturaHLSPlugin.as
+++ KalturaHLSPlugin/src/KalturaHLSPlugin.as
@@ -1,6 +1,7 @@
 package
 {
 	import com.kaltura.hls.HLSPluginInfo;
+	import com.kaltura.hls.manifest.HLSManifestParser;
     import com.kaltura.kdpfl.model.MediaProxy;
     import com.kaltura.kdpfl.plugin.IPlugin;
     import com.kaltura.kdpfl.plugin.IPluginFactory;
@@ -14,6 +15,8 @@
     import com.kaltura.kdpfl.plugin.KPluginEvent;
 	import com.kaltura.kdpfl.plugin.KalturaHLSMediator;

+	import com.kaltura.kdpfl.model.ConfigProxy;
+
 	import flash.display.Sprite;

 	import org.osmf.media.PluginInfo;
@@ -25,6 +28,7 @@
         private static const HLS_PLUGIN_INFO:String = "com.kaltura.hls.HLSPluginInfo";
 		private var _pluginResource:MediaResourceBase;

+		private var _segmentBuffer:int = -1;

         public function KalturaHLSPlugin()
         {
@@ -32,6 +36,16 @@
             _pluginInfo = new HLSPluginInfo();
         }

+		public function get segmentBuffer():int
+		{
+			return _segmentBuffer;
+		}
+
+		public function set segmentBuffer(value:int):void
+		{
+			_segmentBuffer = value;
+		}
+
         public function create (pluginName : String =null) : IPlugin
         {
             return this;
@@ -61,6 +75,8 @@
         {
 			if ( e.resource && e.resource == _pluginResource ) {
 				e.target.removeEventListener(MediaFactoryEvent.PLUGIN_LOAD, onOSMFPluginLoaded);
+				if (segmentBuffer != -1)
+					HLSManifestParser.MAX_SEG_BUFFER = segmentBuffer;
 				dispatchEvent( new KPluginEvent (KPluginEvent.KPLUGIN_INIT_COMPLETE) );
 			}


column lists now display projection and dateFormat metadata

--- WeaveData/src/weave/utils/ColumnUtils.as
+++ WeaveData/src/weave/utils/ColumnUtils.as
@@ -27,6 +27,7 @@
 	import weave.api.WeaveAPI;
 	import weave.api.core.ILinkableHashMap;
 	import weave.api.data.ColumnMetadata;
+	import weave.api.data.DataTypes;
 	import weave.api.data.IAttributeColumn;
 	import weave.api.data.IColumnWrapper;
 	import weave.api.data.IDataSource;
@@ -83,6 +84,13 @@
 			var title:String = ColumnUtils.getTitle(column);
 			var keyType:String = ColumnUtils.getKeyType(column);
 			var dataType:String = ColumnUtils.getDataType(column);
+			var projection:String = column.getMetadata(ColumnMetadata.PROJECTION);
+			var dateFormat:String = column.getMetadata(ColumnMetadata.DATE_FORMAT);
+
+			if (dataType == DataTypes.DATE && dateFormat)
+				dataType = dataType + '; ' + dateFormat;
+			if (dataType == DataTypes.GEOMETRY && projection)
+				dataType = dataType + '; ' + projection;

 			if (dataType && keyType)
 				return StandardLib.substitute("{0} ({1} -> {2})", title, keyType, dataType);


setting length of output array

setting length of output array

--- WeaveData/src/weave/utils/VectorUtils.as
+++ WeaveData/src/weave/utils/VectorUtils.as
@@ -495,6 +495,8 @@
 				else
 					output[keyValue] = item;
 			}
+			output.length = keys ? keys.length : 0;
+
 			return output;
 		}


Update menuColourIdiomes.as

Update menuColourIdiomes.as

--- com/segonquart/menuColourIdiomes.as
+++ com/segonquart/menuColourIdiomes.as
@@ -2,7 +2,7 @@
 import mx.transitions.easing.*;
 import com.mosesSupposes.fuse.*;

-class com segonquart menuColouridiomes extends MoviieClip
+class menuColouridiomes extends MoviieClip

 	{
 		public var cat, es, en ,fr:MovieClip;
@@ -35,4 +35,4 @@

 		}

-	}+	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/advancedgrids/src/mx/olap/IOLAPElement.as
+++ frameworks/projects/advancedgrids/src/mx/olap/IOLAPElement.as
@@ -0,0 +1,93 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+/**
+*  The IOLAPElement interface defines a base interface that provides
+*  common properties for all OLAP elements.
+*.
+*  @see mx.olap.OLAPElement
+*
+*  @langversion 3.0
+*  @playerversion Flash 9
+*  @playerversion AIR 1.1
+*  @productversion Flex 3
+*/
+public interface IOLAPElement
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  dimension
+	//----------------------------------
+
+    /**
+     *  The dimension to which this element belongs.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get dimension():IOLAPDimension;
+
+    //----------------------------------
+	//  displayName
+	//----------------------------------
+
+    /**
+     *  The name of the OLAP element, as a String, which can be used for display.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get displayName():String;
+
+    //----------------------------------
+	//  name
+	//----------------------------------
+
+    /**
+     *  The name of the OLAP element that includes the OLAP schema hierarchy of the element.
+     *  For example, "Time_Year" is the name of the OLAP element,
+     *  where "Year" is a level of the "Time" dimension in an OLAP schema.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get name():String;
+
+    //----------------------------------
+	//  uniqueName
+	//----------------------------------
+
+    /**
+     *  The unique name of the OLAP element in the cube.
+     *  For example, "[Time][Year][2007]" is a unique name,
+     *  where 2007 is the element name belonging to the "Year" level of the "Time" dimension.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    function get uniqueName():String;
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4460
Author:   gosmith@adobe.com
Date:     2009-01-09T01:53:33.590972Z

Log Message:
-----------
Renamed UIComponentAccImpl to UIComponentAccProps because it extends AccessibilityProperties, not AccessibilityImplementation.

Added comments with the identifier for each magic role constant, so that it is easier to understand what roles our components are using.

Moved two static methods from UIComponentAccProperties to AccImpl because they make more sense there.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: None (no functional changes)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccImpl.as" copyfrom-rev="4437" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>

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

--- frameworks/projects/framework/src/mx/accessibility/AccImpl.as
+++ frameworks/projects/framework/src/mx/accessibility/AccImpl.as
@@ -15,9 +15,16 @@
 import flash.accessibility.Accessibility;
 import flash.accessibility.AccessibilityImplementation;
 import flash.accessibility.AccessibilityProperties;
+import flash.display.DisplayObjectContainer;
 import flash.events.Event;
+import mx.containers.Form;
+import mx.containers.FormHeading;
+import mx.containers.FormItem;
+import mx.controls.Label;
+import mx.core.Container;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
+import mx.managers.SystemManager;

 use namespace mx_internal;

@@ -88,6 +95,83 @@
 	{
 	}

+    /**
+     *  Method for supporting Form Accessibility.
+     *  @review
+     */
+    public static function getFormName(component:UIComponent):String
+    {
+        var formName:String = "";
+
+        // Return nothing if we are a container
+        if (component is Container)
+            return formName;
+
+        // keeping this DisplayObjectContainer since parent returns
+        // that as root is not a UIComponent.
+        var par:DisplayObjectContainer = component.parent;
+        // continue looking up the parent chain
+        // until root (or application) or FormItem is found.
+        while (par && !(par is FormItem) &&
+               !(par is SystemManager) && par != component.root)
+        {
+            par = par.parent;
+        }
+
+        if (par && par is FormItem)
+            formName = updateFormItemString(FormItem(par));
+
+        return formName;
+    }
+
+    /**
+     *  @private
+     *  Method for supporting Form Accessibility.
+     */
+    private static function updateFormItemString(formItem:FormItem):String
+    {
+        var formName:String = "";
+
+        const itemLabel:Label = formItem.itemLabel;
+        const accProp:AccessibilityProperties = (itemLabel ? itemLabel.accessibilityProperties : null);
+        if (accProp && accProp.silent)
+            return accProp.name;
+
+        var form:UIComponent = UIComponent(formItem.parent);
+
+        // If we are located within a Form, then look for the first FormHeading
+        // that is a sibling that is above us in the parent's child hierarchy
+        if (form is Form)
+        {
+            var formItemIndex:int = form.getChildIndex(formItem);
+            for (var i:int = formItemIndex; i >= 0; i--)
+            {
+                var child:UIComponent = UIComponent(form.getChildAt(i));
+                if (child is FormHeading)
+                {
+                    formName = FormHeading(child).label + " ";
+                    break;
+                }
+            }
+        }
+
+        // Add in text if we are a required field
+        if (formItem.required)
+            formName += "Required Field ";
+
+        // Add in the label from the formItem
+        if (formItem.label != "")
+            formName += formItem.label + " ";
+
+        if (accProp && !accProp.silent)
+        {
+            accProp.silent = true;
+            accProp.name = formName;
+        }
+
+        return formName;
+    }
+
 	//--------------------------------------------------------------------------
 	//
 	//  Constructor
@@ -108,7 +192,7 @@

 		stub = false;

-		// Hook in UIComponentAccImpl setup here!
+		// Hook in UIComponentAccProps setup here!
 		master.accessibilityProperties = new AccessibilityProperties();

 		// Hookup events to listen for
@@ -191,12 +275,15 @@
 	 */
 	override public function get_accName(childID:uint):String
 	{
-		var accName:String = UIComponentAccImpl.getFormName(master);
-
-		if (childID == 0 && master.accessibilityProperties
-			&& master.accessibilityProperties.name
-				&& master.accessibilityProperties.name != "")
+		var accName:String = getFormName(master);
+
+		if (childID == 0 &&
+			master.accessibilityProperties &&
+			master.accessibilityProperties.name != null &&
+			master.accessibilityProperties.name != "")
+		{
 			accName += master.accessibilityProperties.name + " ";
+		}

 		accName += getName(childID) + getStatusName();

@@ -212,7 +299,7 @@
 	/**
 	 *  Returns the name of the accessible component.
 	 *  All subclasses must implement this
-	 *  instead of implementing get_accName.
+	 *  instead of implementing get_accName().
 	 */
 	protected function getName(childID:uint):String
 	{
@@ -220,14 +307,16 @@
 	}

 	/**
-	 *  Utility method determines state of the accessible component.
+	 *  Utility method to determine state of the accessible component.
 	 */
 	protected function getState(childID:uint):uint
 	{
 		var accState:uint = STATE_SYSTEM_NORMAL;

 		if (!UIComponent(master).enabled)
+		{
 			accState |= STATE_SYSTEM_UNAVAILABLE;
+		}
 		else
 		{
 			accState |= STATE_SYSTEM_FOCUSABLE
@@ -271,12 +360,6 @@
 		switch (event.type)
 		{
 			case "errorStringChanged":
-			{
-				Accessibility.sendEvent(master, 0, EVENT_OBJECT_NAMECHANGE);
-				Accessibility.updateProperties();
-				break;
-			}
-
 			case "toolTipChanged":
 			{
 				Accessibility.sendEvent(master, 0, EVENT_OBJECT_NAMECHANGE);


Transferred from the Adobe Open Source Subversion Repository

Revision: 8483
Author:   smgilson@adobe.com
Date:     2009-07-09T17:52:48.367800Z

Log Message:
-----------
Second checkin to update the namespace in ASDoc MXML syntax descriptions for Spark components

QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/SetAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -85,7 +85,7 @@
  *  attributes of its superclass and adds the following tag attributes:

  *
  *

- *  <VerticalLayout
+ *  <s:VerticalLayout
  *    Properties
  *    gap="6"
  *    horizontalAlign="left"


Transferred from the Adobe Open Source Subversion Repository

Revision: 6609
Author:   gruehle@adobe.com
Date:     2009-05-04T22:47:31.285324Z

Log Message:
-----------
Add theme attribute to theme-specific style metadata.

Example of a halo-specific style:
[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo")]

Example of a spark-specific style:
[Style(name="baseColor", type="uint", format="Color", inherit="yes", theme="spark")]

Style metadata without a theme attribute is theme-agnostic, and works with either spark or halo.

Bugs: SDK-20606

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/FillStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BarColorStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/IconColorStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SelectedFillColorsStyle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.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/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/mx/src/mx/controls/DataGrid.as
+++ frameworks/projects/mx/src/mx/controls/DataGrid.as
@@ -298,7 +298,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-[Style(name="headerColors", type="Array", arrayType="uint", format="Color", inherit="yes")]
+[Style(name="headerColors", type="Array", arrayType="uint", format="Color", inherit="yes", theme="halo")]

 /**
  *  The color of the row background when the user rolls over the row.


fixed bug in Synchronizer - onlyWhenFocused now works properly.

Change-Id: Iff36dd24d77fffdd5693fbcfa44826d34186f3a0

--- WeaveCore/src/weave/core/Synchronizer.as
+++ WeaveCore/src/weave/core/Synchronizer.as
@@ -147,7 +147,7 @@

 			// if the bindable value is not a boolean and the bindable parent has focus, delay synchronization
 			var bindableValue:Object = bindableParent[bindablePropertyName];
-			if (!useLinkableValue && uiComponent && !(bindableValue is Boolean))
+			if (uiComponent && !(bindableValue is Boolean))
 			{
 				var obj:DisplayObject = uiComponent.getFocus();
 				if (obj && uiComponent.contains(obj)) // has focus
@@ -182,7 +182,7 @@
 						return;
 					}
 				}
-				else if (onlyWhenFocused && !callingLater)
+				else if (!useLinkableValue && onlyWhenFocused && !callingLater)
 				{
 					// component does not have focus, so ignore the bindableValue.
 					return;


Made mode be static so that the current drawing mode is a global idea rather than a per-drawable idea.

git-svn-id: f772d44cbf86d9968f12179c1556189f5afcea6e@629 e0ac87d7-b42b-0410-9034-8248a05cb448

--- braineditor/Drawable.as
+++ braineditor/Drawable.as
@@ -2,14 +2,14 @@
   static var DRAGMODE=0;
   static var DRAWMODE=1;
   static var ERASEMODE=2;
-  var mMode:Number;
+  static var mMode:Number;
   var mSelectBox:Sprite;
   var mMouseCount;
   function Drawable(parent:MovieClip,layer:Number) {
      super(parent,layer);
-     this.mMode=DRAWMODE;
-     //this.mMode=DRAGMODE;
-     //this.mMode=ERASEMODE;
+     mMode=DRAWMODE;
+     //mMode=DRAGMODE;
+     //mMode=ERASEMODE;
   }
   function _mouseFunction(boxColor:Number) {
          mSelectBox.clear();
@@ -24,6 +24,7 @@
   }
   function commitBox(topLeft:Point, botRight:Point, doErase:Boolean) {
     if (doErase) {
+    ///FIXME we probably want to call refresh and redraw everything so that a doughnut with a hole in the middle isn't actually a round bread with a painted white in the middle
       drawBoxOutline(topLeft,botRight,
                                      1,
                                      0xffffff,
@@ -40,7 +41,7 @@
     }
   }
   function onPress():Void {
-     if (this.mMode==DRAGMODE) {
+     if (mMode==DRAGMODE) {
          mSurface.startDrag(false,-16384,-16384,16384,16834);
          var lobe=this;
          mSurface.onMouseUp=function()
@@ -48,20 +49,20 @@
             lobe.mSurface.onMouseUp=function(){};
             lobe.mSurface.stopDrag();
          }
-     }else if (this.mMode==DRAWMODE||this.mMode==ERASEMODE) {
+     }else if (mMode==DRAWMODE||mMode==ERASEMODE) {
          var mousePos=new Point(_root._xmouse,_root._ymouse)
          mSelectBox=new Sprite(mSurface,mSurface.getNextHighestDepth());
          var localMousePos=worldToLocal(mousePos);
          mSelectBox.setPosition(localMousePos);
          mSelectBox.penTo(mousePos);
          var lobe=this;
-         var doErase=(this.mMode==ERASEMODE);
+         var doErase=(mMode==ERASEMODE);
          var tempBoxColor=0x0000ff;
          if (doErase) {
-            this.mMode=DRAWMODE;///<-- FIXME: this alternates between draw and erase modes until we have global selection process
+            mMode=DRAWMODE;///<-- FIXME: this alternates between draw and erase modes until we have global selection process
             tempBoxColor=0xff0000;
          }else {
-            this.mMode=ERASEMODE;
+            mMode=ERASEMODE;
          }
          mSurface.onMouseMove=function(){lobe._mouseFunction(tempBoxColor);};
          mSurface.onMouseUp=function()


added enterOnceFlag to ExitShapeTrigger

added enterOnceFlag to ExitShapeTrigger

--- src/hype/extended/trigger/ExitShapeTrigger.as
+++ src/hype/extended/trigger/ExitShapeTrigger.as
@@ -23,7 +23,7 @@
 		 * @param shapeFlag True if the actual shape of the shape is to be used
 		 * false if only the bounding box should be used
 		 */
-		public function ExitShapeTrigger(callback:Function, target:Object, shape:DisplayObject, enterOnceFlag:Boolean=false, shapeFlag:Boolean=false) {
+		public function ExitShapeTrigger(callback:Function, target:Object, shape:DisplayObject, shapeFlag:Boolean=false, enterOnceFlag:Boolean=false) {
 			super(callback, target);
 			_shape = shape;
 			_shapeFlag = shapeFlag;


Marked writeArray function inside YAMLSerializator as public.

--- src/Modi/YAMLSerializator.as
+++ src/Modi/YAMLSerializator.as
@@ -83,7 +83,7 @@
 			writeToTop(name, object);
 		}

-		function writeArray(name:String, object:Array):void
+		public function writeArray(name:String, object:Array):void
 		{
 			trace("Not sure that write array works...");
 			writeToTop(name, object);


Fixed carousel masking

Fixed carousel masking

git-svn-id: 02605e11d3a461bc7e12f3f3880edf4b0c8dcfd0@4501 3e7533ad-8678-4d30-8e38-00a379d3f0d0

--- src/laml/display/Carousel.as
+++ src/laml/display/Carousel.as
@@ -27,7 +27,7 @@
 			dataProvider = new SelectableList();
 			horizontalGutter = DEFAULT_HORIZONTAL_GUTTER;
 			padding = DEFAULT_PADDING;
-			defaultItemRenderer = '<IconButton backgroundColor="#ffcc00" height="100%" text="{title}" />';
+			itemRenderer = "<IconButton width='100%' height='100%' text='{title}' />";
 			model.validate_dataProvider = validateDataProvider;
 		}

@@ -47,12 +47,20 @@
 			return model.textFormat as TextFormat;
 		}

-		public function set itemRenderer(itemRenderer:String):void {
-			model.itemRenderer = itemRenderer;
-		}
-
-		public function get itemRenderer():String {
-			return model.itemRenderer || defaultItemRenderer;
+		public function set itemRenderer(itemRenderer:*):void {
+			if(itemRenderer is String) {
+				model.itemRendererString = itemRenderer;
+			}
+			else if(itemRenderer is Class) {
+				model.itemRendererClass = itemRenderer;
+			}
+			else {
+				model.itemRenderer = itemRenderer;
+			}
+		}
+
+		public function get itemRenderer():* {
+			return model.itemRendererString || model.itemRendererClass || model.itemRenderer || defaultItemRenderer;
 		}

 		override public function set dataProvider(dataProvider:ISelectableList):void {
@@ -61,7 +69,7 @@
 			}
 			super.dataProvider = dataProvider;
 		}
-
+
 		protected function validateDataProvider(newItem:ISelectableList, oldItem:ISelectableList):void {
 			if(oldItem) {
 				// clear all old views...
@@ -69,12 +77,11 @@
 				contentContainer.removeAllChildren();
 			}

-			// newItem is never null - check setter
 			var parser:LAMLParser = new LAMLParser();
-			var xml:XML = new XML(itemRenderer);
 			newItem.forEach(function(item:Object, index:int, items:Array):void {
-				createItemView(item, xml, parser);
+				createItemView(item, parser);
 			});
+
 			newItem.addEventListener(PayloadEvent.SELECTION_CHANGED, selectionChangedHandler);

 			if(newItem.selectedIndex == -1 && newItem.length > 0) {
@@ -84,8 +91,20 @@
 			updateSelection();
 		}

-		protected function createItemView(data:Object, itemXml:XML, parser:LAMLParser):void {
-			var itemView:Layoutable = parser.parseLayoutable(itemXml, data);
+		protected function createItemView(data:Object, parser:LAMLParser):void {
+			var itemView:Layoutable;
+			if(model.itemRendererString) {
+				var itemXml:XML = new XML(itemRenderer);
+				itemView = parser.parseLayoutable(itemXml, data);
+			}
+			else if(model.itemRendererClass) {
+				itemView = new model.itemRendererClass();
+				itemView.data = data;
+			}
+			else {
+				trace(">> WARNING itemRenderer set with unknown type");
+			}
+
 			contentContainer.addChild(itemView);
 		}

@@ -151,10 +170,6 @@
 			}

 			return -((displayedIndex * getItemSize(contentMask.width)) + (horizontalGutter * dataProvider.selectedIndex));
-		}
-
-		override protected function commitProperties():void {
-			super.commitProperties();
 		}

 		override protected function updateDisplayList(w:Number, h:Number):void {
@@ -170,7 +185,7 @@
 			contentContainer.render();

 			if(!contentContainer.mask) {
-				contentContainer.mask = contentMask;
+				contentContainer.view.mask = contentMask.view;
 				contentContainer.view.cacheAsBitmap = true;
 			}
 		}


bring the functionality from UD's HueFilter into FilterUtil.  I need to test this with UD to make
sure it works, and then these matrix functions should probably be put into a separate lib class
(perhaps a new narya com.threerings.util.Matrix?)

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

--- src/as/com/threerings/flash/FilterUtil.as
+++ src/as/com/threerings/flash/FilterUtil.as
@@ -160,11 +160,100 @@
         }
     }

+    /**
+    * Shift the color matrix filter by the given amount.  This is adapted from the code found at
+    * http://www.kirupa.com/forum/showthread.php?t=230706
+    */
+    public static function shiftHueBy (original :ColorMatrixFilter,
+        hueShift :int) :ColorMatrixFilter
+    {
+        var M1 :Array = [ 0.213, 0.715, 0.072,
+                          0.213, 0.715, 0.072,
+                          0.213, 0.715, 0.072 ];
+        var M2 :Array = [ 0.787, -0.715, -0.072,
+                         -0.212, 0.285, -0.072,
+                         -0.213, -0.715, 0.928 ];
+        var M3 :Array = [-0.213, -0.715, 0.928,
+                          0.143, 0.140, -0.283,
+                         -0.787, 0.715, 0.072 ];
+        var M4 :Array = add(M1, add(multiply(Math.cos(hueShift * Math.PI / 180), M2),
+            multiply(Math.sin(hueShift * Math.PI / 180), M3)));
+
+        var originalMatrix :Array = original.matrix;
+        if (originalMatrix == null) {
+            originalMatrix = original.matrix;
+        }
+
+        return new ColorMatrixFilter(concat(originalMatrix, [ M4[0], M4[1], M4[2], 0, 0,
+                                                              M4[3], M4[4], M4[5], 0, 0,
+                                                              M4[6], M4[7], M4[8], 0, 0,
+                                                                  0,     0,     0, 1, 0 ]));
+    }
+
     protected static function checkArgs (disp :DisplayObject, filter :BitmapFilter) :void
     {
         if (disp == null || filter == null) {
             throw new ArgumentError("args may not be null");
         }
     }
+
+    protected static function identity () :Array
+    {
+        return [ 1, 0, 0, 0, 0,
+                 0, 1, 0, 0, 0,
+                 0, 0, 1, 0, 0,
+                 0, 0, 0, 1, 0 ];
+    }
+
+    protected static function add (A :Array, B :Array) :Array
+    {
+        var C :Array = [];
+        for(var ii :int = 0; ii < A.length; ii++)
+        {
+            C.push( A[ii] + B[ii] );
+        }
+        return C;
+    }
+
+    protected static function multiply(x :Number, B :Array) :Array
+    {
+        var A :Array = [];
+        for each (var n :Number in B)
+        {
+            A.push(x * n);
+        }
+        return A;
+    }
+
+    protected static function concat(A :Array, B :Array) :Array
+    {
+        var nM :Array = [];
+
+        nM[0] = (A[0] * B[0]) + (A[1] * B[5]) + (A[2] * B[10]) + (A[3] * B[15]);
+        nM[1] = (A[0] * B[1]) + (A[1] * B[6]) + (A[2] * B[11]) + (A[3] * B[16]);
+        nM[2] = (A[0] * B[2]) + (A[1] * B[7]) + (A[2] * B[12]) + (A[3] * B[17]);
+        nM[3] = (A[0] * B[3]) + (A[1] * B[8]) + (A[2] * B[13]) + (A[3] * B[18]);
+        nM[4] = (A[0] * B[4]) + (A[1] * B[9]) + (A[2] * B[14]) + (A[3] * B[19]) + A[4];
+
+        nM[5] = (A[5] * B[0]) + (A[6] * B[5]) + (A[7] * B[10]) + (A[8] * B[15]);
+        nM[6] = (A[5] * B[1]) + (A[6] * B[6]) + (A[7] * B[11]) + (A[8] * B[16]);
+        nM[7] = (A[5] * B[2]) + (A[6] * B[7]) + (A[7] * B[12]) + (A[8] * B[17]);
+        nM[8] = (A[5] * B[3]) + (A[6] * B[8]) + (A[7] * B[13]) + (A[8] * B[18]);
+        nM[9] = (A[5] * B[4]) + (A[6] * B[9]) + (A[7] * B[14]) + (A[8] * B[19]) + A[9];
+
+        nM[10] = (A[10] * B[0]) + (A[11] * B[5]) + (A[12] * B[10]) + (A[13] * B[15]);
+        nM[11] = (A[10] * B[1]) + (A[11] * B[6]) + (A[12] * B[11]) + (A[13] * B[16]);
+        nM[12] = (A[10] * B[2]) + (A[11] * B[7]) + (A[12] * B[12]) + (A[13] * B[17]);
+        nM[13] = (A[10] * B[3]) + (A[11] * B[8]) + (A[12] * B[13]) + (A[13] * B[18]);
+        nM[14] = (A[10] * B[4]) + (A[11] * B[9]) + (A[12] * B[14]) + (A[13] * B[19]) + A[14];
+
+        nM[15] = (A[15] * B[0]) + (A[16] * B[5]) + (A[17] * B[10]) + (A[18] * B[15]);
+        nM[16] = (A[15] * B[1]) + (A[16] * B[6]) + (A[17] * B[11]) + (A[18] * B[16]);
+        nM[17] = (A[15] * B[2]) + (A[16] * B[7]) + (A[17] * B[12]) + (A[18] * B[17]);
+        nM[18] = (A[15] * B[3]) + (A[16] * B[8]) + (A[17] * B[13]) + (A[18] * B[18]);
+        nM[19] = (A[15] * B[4]) + (A[16] * B[9]) + (A[17] * B[14]) + (A[18] * B[19]) + A[19];
+
+        return nM;
+    }
 }
 }


fixed bug where icon media was not saving properly


using LinkablePromise validateNow constructor option

--- WeaveData/src/weave/data/DataSources/WeaveAnalystDataSource.as
+++ WeaveData/src/weave/data/DataSources/WeaveAnalystDataSource.as
@@ -126,7 +126,7 @@
 		public const inputs:LinkableHashMap = newLinkableChild(this, LinkableHashMap);
 		public const inputKeyFilter:LinkableDynamicObject = registerLinkableChild(this, new LinkableDynamicObject(IKeyFilter));

-		private const promise:LinkablePromise = registerLinkableChild(this, new LinkablePromise(runScript, describePromise));
+		private const promise:LinkablePromise = registerLinkableChild(this, new LinkablePromise(runScript, describePromise, true));
 		private function describePromise():String { return lang("Running script {0}", scriptName.value); }
 		private const outputCSV:CSVDataSource = newLinkableChild(this, CSVDataSource);
 		private var _service:AMF3Servlet;
@@ -134,7 +134,6 @@
 		override protected function initialize():void
 		{
 			super.initialize();
-			promise.validate();
 		}

 		private function handleURLChange():void


scatterplot missing data icon now same size as default circle

Change-Id: I9a467647941386e4d891ba4e1461d70bc63987b1

--- WeaveUI/src/weave/visualization/plotters/CircleGlyphPlotter.as
+++ WeaveUI/src/weave/visualization/plotters/CircleGlyphPlotter.as
@@ -109,7 +109,7 @@
 			{
 				radius = defaultScreenRadius.value;
 				//draw a square for missing values
-				graphics.drawRect(tempPoint.x - radius/2, tempPoint.y - radius/2, radius, radius);
+				graphics.drawRect(tempPoint.x - radius, tempPoint.y - radius, radius * 2, radius * 2);
 			}
 			else if(isNaN(radius)) // no screenRadius column
 			{


Fail if DOMDocument fails to load

Fail if DOMDocument fails to load

--- exporter/src/main/as/flump/export/XflLoader.as
+++ exporter/src/main/as/flump/export/XflLoader.as
@@ -66,7 +66,8 @@

     protected function listLibrary (file :File) :void {
         use namespace xflns;
-        var loadDomFile :Future = Files.load(file.resolvePath("DOMDocument.xml"), _loader);
+        const domFile :File = file.resolvePath("DOMDocument.xml");
+        const loadDomFile :Future = Files.load(domFile, _loader);
         loadDomFile.succeeded.add(function (domFile :File) :void {
             const xml :XML = bytesToXML(domFile.data);

@@ -79,6 +80,11 @@
             }

             // Done loading
+            _loader.shutdown();
+        });
+        loadDomFile.failed.add(function (error :Object) :void {
+            _library.addError(_library, ParseError.CRIT, "Unable to read " + domFile.nativePath,
+                error);
             _loader.shutdown();
         });
     }
@@ -111,8 +117,7 @@
             }
         });
         loadLibraryFile.failed.add(function (error :Object) :void {
-            _library.addError(_library, ParseError.CRIT,
-                "Unable to load file " + file.nativePath, error);
+            _library.addError(_library, ParseError.CRIT, "Unable to read " + file.nativePath, error);
         });
     }


StreamBuffer.as : use DTS as a mean to sort tags from the different queues (header/metadata/audio/video) this is more consistent for the decoders

--- src/org/mangui/hls/stream/StreamBuffer.as
+++ src/org/mangui/hls/stream/StreamBuffer.as
@@ -609,7 +609,7 @@
         /*
          * retrieve queue containing next tag to be injected, using the following priority :
          * smallest continuity
-         * then smallest pts
+         * then smallest dts
          * then header  then video then audio then metadata tags
          */
         private function getnexttag() : FLVData {
@@ -636,26 +636,26 @@
             if (continuity == int.MAX_VALUE)
                 return null;

-            var pts : Number = Number.MAX_VALUE;
-            // for this continuity counter, find smallest PTS
-
-            if (htag && htag.continuity == continuity) pts = Math.min(pts, htag.tag.pts);
-            if (vtag && vtag.continuity == continuity) pts = Math.min(pts, vtag.tag.pts);
-            if (atag && atag.continuity == continuity) pts = Math.min(pts, atag.tag.pts);
-            if (mtag && mtag.continuity == continuity) pts = Math.min(pts, mtag.tag.pts);
-
-            // for this continuity counter, this PTS, prioritize tags with the following order : header/video/audio/metadata
-            if (htag && htag.continuity == continuity && htag.tag.pts == pts) {
+            var dts : Number = Number.MAX_VALUE;
+            // for this continuity counter, find smallest DTS
+
+            if (htag && htag.continuity == continuity) dts = Math.min(dts, htag.tag.dts);
+            if (vtag && vtag.continuity == continuity) dts = Math.min(dts, vtag.tag.dts);
+            if (atag && atag.continuity == continuity) dts = Math.min(dts, atag.tag.dts);
+            if (mtag && mtag.continuity == continuity) dts = Math.min(dts, mtag.tag.dts);
+
+            // for this continuity counter, this DTS, prioritize tags with the following order : header/metadata/video/audio
+            if (htag && htag.continuity == continuity && htag.tag.dts == dts) {
                 _headerIdx++;
                 return htag;
             }
-            if (vtag && vtag.continuity == continuity && vtag.tag.pts == pts) {
+            if (mtag && mtag.continuity == continuity && mtag.tag.dts == dts) {
+                _metaIdx++;
+                return mtag;
+            }
+            if (vtag && vtag.continuity == continuity && vtag.tag.dts == dts) {
                 _videoIdx++;
                 return vtag;
-            }
-            if (mtag && mtag.continuity == continuity && mtag.tag.pts == pts) {
-                _metaIdx++;
-                return mtag;
             } else {
                 _audioIdx++;
                 return atag;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5361
Author:   mhorn@adobe.com
Date:     2009-03-17T21:14:43.852314Z

Log Message:
-----------
minor ASDoc updates

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>

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

--- frameworks/projects/mx/src/mx/controls/TextArea.as
+++ frameworks/projects/mx/src/mx/controls/TextArea.as
@@ -1524,7 +1524,7 @@
      *  Specifies whether the text can be selected.
      *  Making the text selectable lets you copy text from the control.
      *
-     *  @default false;
+     *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


disabled pen tool menu items when right-clicking on desktop

--- WeaveUISpark/src/weave/ui/PenTool.as
+++ WeaveUISpark/src/weave/ui/PenTool.as
@@ -736,9 +736,14 @@
 			_penToolMenuItem.caption = ENABLE_PEN;
 			_removeDrawingsMenuItem.enabled = false;

-			// If session state is imported need to detect if there are drawings.
-			var linkableContainer:ILinkableContainer = getLinkableContainer(e.mouseTarget) as ILinkableContainer;
-			if (linkableContainer)
+			var linkableContainer:ILinkableContainer = getLinkableContainer(e.mouseTarget);
+			var visualization:Visualization = getVisualization(e.mouseTarget);
+
+			_penToolMenuItem.enabled = !!visualization && !!linkableContainer;
+			_removeDrawingsMenuItem.enabled = false;
+			_changeDrawingMode.enabled = false;
+
+			if (_penToolMenuItem.enabled)
 			{
 				var penObject:PenTool = linkableContainer.getLinkableChildren().getObject( PEN_OBJECT_NAME ) as PenTool;
 				if (penObject)
@@ -767,11 +772,11 @@
 		private static function handlePenToolToggleMenuItem(e:ContextMenuEvent):void
 		{
 			var linkableContainer:ILinkableContainer = getLinkableContainer(e.mouseTarget);
-			if (!linkableContainer)
-				return;
-
 			var visualization:Visualization = getVisualization(e.mouseTarget);
-			if (!visualization)
+
+			_penToolMenuItem.enabled = !!visualization && !!linkableContainer;
+
+			if (!_penToolMenuItem.enabled)
 				return;

 			var penTool:PenTool = linkableContainer.getLinkableChildren().requestObject(PEN_OBJECT_NAME, PenTool, false);


Deliver user-friendly error messages for certain publishing errors

--- exporter/src/main/as/flump/export/ProjectController.as
+++ exporter/src/main/as/flump/export/ProjectController.as
@@ -360,6 +360,10 @@
         stage.quality = StageQuality.BEST;

         try {
+            if (_exportChooser.dir == null)
+                throw new Error("No export directory specified.");
+            if (_conf.exports.length == 0)
+                throw new Error("No export formats specified.");
             createPublisher().publish(status.lib);
         } catch (e :Error) {
             ErrorWindowMgr.showErrorPopup("Publishing Failed", e.message, _win);


Now requesting full geom detail from all descendant
StreamedGeometryColumns whether or not they are accessible via
IColumnWrapper interface.

Change-Id: I9c39cd47d6dd64fb5b6ba5b772f0f2e3837099b4

--- WeaveData/src/weave/data/ProjectionManager.as
+++ WeaveData/src/weave/data/ProjectionManager.as
@@ -323,6 +323,7 @@
 import weave.api.data.IColumnWrapper;
 import weave.api.data.IProjector;
 import weave.api.data.IQualifiedKey;
+import weave.api.getLinkableDescendants;
 import weave.api.newDisposableChild;
 import weave.api.registerDisposableChild;
 import weave.data.AttributeColumns.GeometryColumn;
@@ -408,27 +409,26 @@
 		//TODO: this metadata may not be sufficient... IAttributeColumn may need a way to list available metadata property names
 		// or provide another column to get metadata from
 		var metadata:XML = <attribute
-				title={ ColumnUtils.getTitle(unprojectedColumn) }
-		keyType={ ColumnUtils.getKeyType(unprojectedColumn) }
-		dataType={ DataType.GEOMETRY }
-		projection={ destinationProjSRS }
+			title={ ColumnUtils.getTitle(unprojectedColumn) }
+			keyType={ ColumnUtils.getKeyType(unprojectedColumn) }
+			dataType={ DataType.GEOMETRY }
+			projection={ destinationProjSRS }
 		/>;
 		reprojectedColumn.setMetadata(metadata);

-		// try to find an internal StreamedGeometryColumn
-		var internalColumn:IAttributeColumn = unprojectedColumn;
-		while (!(internalColumn is StreamedGeometryColumn) && internalColumn is IColumnWrapper)
-			internalColumn = (internalColumn as IColumnWrapper).getInternalColumn();
-		var streamedGeomColumn:StreamedGeometryColumn = internalColumn as StreamedGeometryColumn;
-		if (streamedGeomColumn)
-		{
-			// Request the full unprojected detail because we don't know how much unprojected
-			// detail we need to display the appropriate amount of reprojected detail.
-			streamedGeomColumn.requestGeometryDetail(streamedGeomColumn.collectiveBounds, 0);
-			// if still downloading the tiles, do not reproject
-			if (streamedGeomColumn.isStillDownloading())
+		// try to find internal StreamedGeometryColumn(s)
+		var streamedColumn:StreamedGeometryColumn;
+		var streamedColumns:Array = getLinkableDescendants(unprojectedColumn, StreamedGeometryColumn);
+
+		// Request the full unprojected detail because we don't know how much unprojected
+		// detail we need to display the appropriate amount of reprojected detail.
+		for each (streamedColumn in streamedColumns)
+			streamedColumn.requestGeometryDetail(streamedColumn.collectiveBounds, 0);
+
+		// if still downloading the tiles, do not reproject
+		for each (streamedColumn in streamedColumns)
+			if (streamedColumn.isStillDownloading())
 				return; // done
-		}

 		// initialize variables before calling processGeometries()
 		keys = unprojectedColumn.keys; // all keys


FLEX-34557 - PlugIn vs. Plugin (Aleksey; reporter; Lee Burrows: patch)

Signed-off-by: Erik de Bruin <c195b508e6f0c57aeafdb5e96947e2b79e6a4b40@ixsoftware.nl>

--- frameworks/projects/framework/src/mx/utils/Platform.as
+++ frameworks/projects/framework/src/mx/utils/Platform.as
@@ -271,7 +271,7 @@
 			_isDesktop = !_isMobile;

 			_isAir = playerType == "Desktop";
-			_isBrowser = (playerType == "Plugin" || playerType == "ActiveX");
+			_isBrowser = (playerType == "PlugIn" || playerType == "ActiveX");

 			_initialized = true;
 		}


FIXED broken mustella tests after :  FIXED mispelled variable that caused getter to be used instead.

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -5596,15 +5596,16 @@
     private function dataProvider_collectionChangeHandler(event:CollectionEvent):void
     {
         var selectionChanged:Boolean = false;
-
+
+
         // If no columns exist, we should try to generate them.
         if (!columns && dataProvider.length > 0)
         {
             columns = generateColumns();
             generatedColumns = (columns != null);
-            gridDimensions.columnCount = generatedColumns ? columns.length : 0;
-        }
-
+            this.gridDimensions.columnCount = generatedColumns ? columns.length : 0;
+        }
+
         const gridDimensions:GridDimensions = this.gridDimensions;
         if (gridDimensions)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10776
Author:   smgilson@adobe.com
Date:     2009-10-01T15:13:17.678879Z

Log Message:
-----------
Minor ASDoc updates for UIComponent.as add/remove events, List.as seletectedIndices/selectedItems, LayoutBase.as useVirtualLayout

QE notes: -
Doc notes: -
Bugs: -
Reviewer: -
Tests run: - checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -442,9 +442,15 @@
     [Bindable("change")]
     /**
      *  A Vector of ints representing the indices of the currently selected
-     *  item or items. If multiple selection is disabled by setting
+     *  item or items.
+     *  If multiple selection is disabled by setting
      *  allowMultipleSelection to false, and this property
      *  is set, the data item corresponding to the first index in the Vector is selected.
+     *
+     *
If multiple selection is enabled by setting
+     *  allowMultipleSelection to true, this property
+     *  contains a list of the selected indices in the reverse order in which they were selected.
+     *  That means the first element in the Vector corresponds to the last item selected.

      *
      *  @default null
      *
@@ -481,6 +487,11 @@
      *  If multiple selection is disabled by setting allowMultipleSelection
      *  to false, and this property is set, the data item
      *  corresponding to the first item in the Vector is selected.
+     *
+     *
If multiple selection is enabled by setting
+     *  allowMultipleSelection to true, this property
+     *  contains a list of the selected items in the reverse order in which they were selected.
+     *  That means the first element in the Vector corresponds to the last item selected.

      *
      *  @default null
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 5181
Author:   dsubrama@adobe.com
Date:     2009-03-05T22:40:12.746581Z

Log Message:
-----------
List work:

-Introduction of two new interfaces that formalize communication between a component and its renderers: IItemRenderer, IItemRendererOwner
-Removed ISelectableRenderer from use by ButtonBar. ButtonBar now works with the above-mentioned interfaces.
-Added labelField/labelFunction to ListBase - usable by List and ButtonBar.
-Introduced new utility class, LabelUtils, which returns the correct text for a data item's renderer given a labelField and labelFunction.
-Removed data-binding from FxDefaultItemRenderer - the new interfaces determine how a component stuffs the right text into the renderer's optional part, labelElement.

Checkintests: Pass
Mustella: ButtonBar and List tests pass
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ItemRenderer.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ISelectableRenderer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/LabelUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/IItemRendererOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/IItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/utils/LabelUtil.as
+++ frameworks/projects/spark/src/spark/utils/LabelUtil.as
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.utils
+{
+
+/**
+ *  This class typically aids components in determining the correct
+ *  text to display for their renderers or sub-parts.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class LabelUtil
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  A function typically used by renderer-aware controls to determine
+     *  the correct text a renderer should display for a particular data item,
+     *  given the item, a labelField and a labelFunction.
+     *
+     *  @param item
+     *  @param labelField
+     *  @param labelFunction
+     */
+    public static function itemToLabel(item:Object, labelField:String=null,
+    	labelFunction:Function=null):String
+    {
+    	if (!item)
+    		return "";
+        else if (labelFunction != null)
+    		return labelFunction(item);
+    	else if (labelField != null)
+    		return item[labelField];
+    	else
+    		return item.toString();
+    }
+}
+
+}


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

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