Transferred from the Adobe Open Source Subversion Repository

Revision: 17073
Author:   hmuller@adobe.com
Date:     2010-07-27T17:55:27.585302Z

Log Message:
-----------
Removed GridContainerBase class.

Corrected Grid/getGridColumn() for column 0 access.

GridItemRenderer rowIndex bindable event is now "rowIndexChanged".

GridLayout/initializeItemRenderer() checks for IGridItemRenderer, not GridItemRenderer.

Grid/isCellVisible columnIndex parameter defaults to -1.

QE notes: changes apply to Spark DataGrid only
Doc notes:
Bugs:
Reviewer: Carol
Tests run: none
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/GridContainerBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -2492,7 +2492,7 @@
          *  @playerversion AIR 2.0
          *  @productversion Flex 4.5
          */
-        public function isCellVisible(rowIndex:int, columnIndex:int):Boolean
+        public function isCellVisible(rowIndex:int, columnIndex:int = -1):Boolean
         {
             return gridLayout.isCellVisible(rowIndex, columnIndex);
         }
@@ -2595,7 +2595,7 @@
         private function getGridColumn(columnIndex:int):GridColumn
         {
             const columns:IList = columns;
-            if ((columns == null) || (columnIndex <= 0) || (columnIndex >= columns.length))
+            if ((columns == null) || (columnIndex < 0) || (columnIndex >= columns.length))
                 return null;

             return columns.getItemAt(columnIndex) as GridColumn;


Transferred from the Adobe Open Source Subversion Repository

Revision: 12332
Author:   egeorgie@adobe.com
Date:     2009-12-01T21:19:10.315392Z

Log Message:
-----------
Fix http://bugs.adobe.com/jira/browse/SDK-24436 Performance issue: App with Groups and Paths is created significantly slower when switching from build 10485 to 12112

Problem: RegExp used in data parsing was choking the Player
Fix: Rewrite it in action script, things should be much faster now.

QE notes: None
Doc notes: None
Bugs: SDK-24436
Reviewer: Corey
Tests run: checkintests, mustella/tests/spark/primitives
Is noteworthy for integration: Yes

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as

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

--- frameworks/projects/spark/src/spark/primitives/Path.as
+++ frameworks/projects/spark/src/spark/primitives/Path.as
@@ -1310,8 +1310,6 @@
 	//
 	//--------------------------------------------------------------------------

-	static private var numberRegExp:RegExp = /[+-]?\d*\.?\d+([Ee][+-]?\d+)?/g;
-
 	private var _charPos:int = 0;
 	private var _dataLength:int = 0;

@@ -1331,24 +1329,114 @@
 			_charPos++;
 		}
 	}
-
-	private function getNumber(useRelative:Boolean, offset:Number, value:String):Number
-	{
-		skipWhiteSpace(value); // updates _charPos
-		var subString:String = value.substr(_charPos);
-		var result:Number = parseFloat(subString);
-		if (isNaN(result))
-		{
-			// Go to the end of the data
-			_charPos = _dataLength;
-			return NaN;
-		}
-
-		numberRegExp.lastIndex = 0;
-		numberRegExp.test(subString);
-		_charPos += numberRegExp.lastIndex;
-		return useRelative ? result + offset : result;
-	}
+
+    private function getNumber(useRelative:Boolean, offset:Number, value:String):Number
+    {
+        // Parse the string and find the first occurrance of the following RexExp
+        // numberRegExp:RegExp = /[+-]?\d*\.?\d+([Ee][+-]?\d+)?/g;
+
+        skipWhiteSpace(value); // updates _charPos
+        if (_charPos >= _dataLength)
+            return NaN;
+
+        // Remember the start of the number
+        var numberStart:int = _charPos;
+        var hasSignCharacter:Boolean = false;
+        var hasDigits:Boolean = false;
+
+        // The number could start with '+' or '-' (the "[+-]?" part of the RegExp)
+        var c:Number = value.charCodeAt(_charPos);
+        if (c == 0x2B || c == 0x2D) // '+' or '-'
+        {
+            hasSignCharacter = true;
+            _charPos++;
+        }
+
+        // The index of the '.' if any
+        var dotIndex:int = -1;
+
+        // First sequence of digits and optional dot in between (the "\d*\.?\d+" part of the RegExp)
+        while (_charPos < _dataLength)
+        {
+            c = value.charCodeAt(_charPos);
+
+            if (c >= 0x30 && c < 0x3A) // A digit
+            {
+                hasDigits = true;
+            }
+            else if (c == 0x2E && dotIndex == -1) // '.'
+            {
+                dotIndex = _charPos;
+            }
+            else
+                break;
+
+            _charPos++;
+        }
+
+        // Now check whether we had at least one digit.
+        if (!hasDigits)
+        {
+            // Go to the end of the data
+            _charPos = _dataLength;
+            return NaN;
+        }
+
+        // 1. Was the last character a '.'? If so, rewind one character back.
+        if (c == 0x2E)
+            _charPos--;
+
+        // So far we have a valid number, remember its end character index
+        var numberEnd:int = _charPos;
+
+        // Check to see if we have scientific notation (the "([Ee][+-]?\d+)?" part of the RegExp)
+        if (c == 0x45 || c == 0x65)
+        {
+            _charPos++;
+
+            // Check for '+' or '-'
+            if (_charPos < _dataLength)
+            {
+                c = value.charCodeAt(_charPos);
+                if (c == 0x2B || c == 0x2D)
+                    _charPos++;
+            }
+
+            // Find all the digits
+            var digitStart:int = _charPos;
+            while (_charPos < _dataLength)
+            {
+                c = value.charCodeAt(_charPos);
+
+                // Not a digit?
+                if (!(c >= 0x30 && c < 0x3A))
+                {
+                    break;
+                }
+
+                _charPos++;
+            }
+
+            // Do we have at least one digit?
+            if (digitStart < _charPos)
+                numberEnd = _charPos; // Scientific notation, update the end index of the number.
+            else
+                _charPos = numberEnd; // No scientific notation, rewind back to the end index of the number.
+        }
+
+        // Use parseFloat to get the actual number.
+        // TODO (egeorgie): we could build the number while matching the RegExp which will save the substr and parseFloat
+        var subString:String = value.substr(numberStart, numberEnd - numberStart);
+        var result:Number = parseFloat(subString);
+        if (isNaN(result))
+        {
+            // Go to the end of the data
+            _charPos = _dataLength;
+            return NaN;
+        }
+        _charPos = numberEnd;
+        return useRelative ? result + offset : result;
+    }
 }

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


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

--- frameworks/projects/spark/src/spark/utils/LabelUtil.as
+++ frameworks/projects/spark/src/spark/utils/LabelUtil.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 spark.utils
 {


def: 3546 display thumbnail on player play end

git-svn-id: 3f608e5a9a704dd448217c0a64c508e7f145cfa1@84300 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
@@ -287,7 +287,8 @@
 				NotificationType.HAS_OPENED_FULL_SCREEN,
 				NotificationType.HAS_CLOSED_FULL_SCREEN,
 				NotificationType.CHANGE_PREFERRED_BITRATE,
-				NotificationType.VIDEO_METADATA_RECEIVED
+				NotificationType.VIDEO_METADATA_RECEIVED,
+				NotificationType.PLAYER_PLAY_END
 			];
 		}

@@ -699,6 +700,11 @@
 						sendNotification( NotificationType.SWITCHING_CHANGE_COMPLETE, {newIndex : oldIndex, newBitrate: _mediaProxy.vo.preferedFlavorBR}  );
 					}

+					break;
+
+				case NotificationType.PLAYER_PLAY_END:
+					cleanMedia();
+					kMediaPlayer.showThumbnail();
 					break;
 			}
 		}


Added setters

Added setters

git-svn-id: 27326a786375daad9d33dc990c6f272e4c8f567c@1363 fda5f131-174c-0410-8613-e0905860106b

--- org.openwms/trunk/org.openwms.common/org.openwms.common.domain.as/src/main/flex/org/openwms/common/domain/LocationGroup.as
+++ org.openwms/trunk/org.openwms.common/org.openwms.common.domain.as/src/main/flex/org/openwms/common/domain/LocationGroup.as
@@ -4,7 +4,7 @@
  * This file is part of openwms.org.
  *
  * openwms.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * it under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation, either version 3 of the
  * License, or (at your option) any later version.
  *
@@ -20,6 +20,8 @@
  */
 package org.openwms.common.domain {

+    import org.openwms.common.domain.values.LocationGroupState;
+
     [Bindable]
     [RemoteClass(alias="org.openwms.common.domain.LocationGroup")]
     /**
@@ -27,13 +29,13 @@
      * <p>
      * Used to group Locations with same characteristics.
      * </p>
-     *
+     *
      * @version $Revision$
      * @since 0.1
      * @see org.openwms.common.domain.Location
      */
     public class LocationGroup extends LocationGroupBase {
-
+
         /**
          * Returns the name.
          *
@@ -42,5 +44,24 @@
         public function toString():String {
             return name;
         }
+
+        /**
+         * Set the groupStateIn.
+         *
+         * @param the new state
+         */
+        public function set groupStateIn(value:LocationGroupState):void {
+            _groupStateIn = value;
+        }
+
+        /**
+         * Set the groupStateOut.
+         *
+         * @param the new state
+         */
+        public function set groupStateOut(value:LocationGroupState):void {
+            _groupStateOut = value;
+        }
     }
-}+}
+


Enable dead code from BVHMesh

Enable dead code from BVHMesh

--- src/aerys/minko/scene/node/mesh/modifier/BVHMesh.as
+++ src/aerys/minko/scene/node/mesh/modifier/BVHMesh.as
@@ -23,48 +23,44 @@
 		public function BVHMesh(target : IMesh)
 		{
 			super(target);
+
+			computeBoundingVolumes();
 		}

-		/*public function visited(query : ISceneVisitor) : void
+		public function computeBoundingVolumes() : void
 		{
-			if (target.version != _version || !_boundingBox)
+			var min				: Vector4			= new Vector4(Number.POSITIVE_INFINITY,
+														 		  Number.POSITIVE_INFINITY,
+																  Number.POSITIVE_INFINITY);
+
+			var max				: Vector4			= new Vector4(Number.NEGATIVE_INFINITY,
+																  Number.NEGATIVE_INFINITY,
+																  Number.NEGATIVE_INFINITY);
+
+			var xyzStream		: VertexStream		= vertexStreamList.getVertexStreamByComponent(VertexComponent.XYZ);
+			var xyzOffset		: int				= xyzStream.format.getOffsetForComponent(VertexComponent.XYZ);
+
+			var dwords			: Vector.<Number>	= xyzStream._data;
+			var dwordsPerVertex	: int				= xyzStream.format.dwordsPerVertex;
+			var dwordsCount		: int				= dwords.length;
+
+			for (var i : int = xyzOffset; i < dwordsCount; i += dwordsPerVertex)
 			{
-				var min				: Vector4			= new Vector4(Number.POSITIVE_INFINITY,
-															 		  Number.POSITIVE_INFINITY,
-																	  Number.POSITIVE_INFINITY);
+				var x : Number = dwords[i];
+				var y : Number = dwords[int(i + 1)];
+				var z : Number = dwords[int(i + 2)];

-				var max				: Vector4			= new Vector4(Number.NEGATIVE_INFINITY,
-																	  Number.NEGATIVE_INFINITY,
-																	  Number.NEGATIVE_INFINITY);
+				min.x = x < min.x ? x : min.x;
+				min.y = y < min.y ? y : min.y;
+				min.z = z < min.z ? z : min.z;

-				var xyzStream		: VertexStream	= vertexStreamList.getVertexStreamByComponent(VertexComponent.XYZ);
-				var xyzOffset		: int				= xyzStream.format.getOffsetForComponent(VertexComponent.XYZ);
-
-				var dwords			: Vector.<Number>	= xyzStream._data;
-				var dwordsPerVertex	: int				= xyzStream.format.dwordsPerVertex;
-				var dwordsCount		: int				= dwords.length;
-
-				for (var i : int = xyzOffset; i < dwordsCount; i += dwordsPerVertex)
-				{
-					var x : Number = dwords[i];
-					var y : Number = dwords[int(i + 1)];
-					var z : Number = dwords[int(i + 2)];
-
-					min.x = x < min.x ? x : min.x;
-					min.y = y < min.y ? y : min.y;
-					min.z = z < min.z ? z : min.z;
-
-					max.x = x > max.x ? x : max.x;
-					max.y = y > max.y ? y : max.y;
-					max.z = z > max.z ? z : max.z;
-				}
-
-				_boundingSphere = BoundingSphere.fromMinMax(min, max);
-				_boundingBox = new BoundingBox(min, max);
-
-				_version = target.version;
+				max.x = x > max.x ? x : max.x;
+				max.y = y > max.y ? y : max.y;
+				max.z = z > max.z ? z : max.z;
 			}
-		}*/
-
+
+			_boundingSphere = BoundingSphere.fromMinMax(min, max);
+			_boundingBox = new BoundingBox(min, max);
+		}
 	}
-}+}


Removed an experimental file that slipped into the last commit.

git-svn-id: 3635f658cd63696bbccf5e31eb8660aa893cf08d@5 6e9afafe-9be5-11de-811b-9ff18243e0fd

--- src/com/robertpenner/signals/Signal_with_cloning.as
+++ src/com/robertpenner/signals/Signal_with_cloning.as
@@ -1,121 +0,0 @@
-package com.robertpenner.signals
-{
-	import flash.utils.Dictionary;
-	import com.robertpenner.signals.IEvent;
-	import com.robertpenner.signals.IEventBubbler;
-
-	public class Signal implements ISignal
-	{
-		protected var _target:*;
-		protected var _eventClass:Class;
-		protected var listeners:Array;
-		protected var onceListeners:Dictionary;
-
-		/**
-		 *
-		 * @param	target The object the signal is dispatching events on behalf of.
-		 * @param	eventClass Optional class reference.
-		 * This enables a event type check in dispatch().
-		 */
-		public function Signal(target:*, eventClass:Class = null)
-		{
-			_target = target;
-			_eventClass = eventClass;
-			listeners = [];
-			onceListeners = new Dictionary();
-		}
-
-		/** The current number of listeners for the signal. */
-		public function get length():uint { return listeners.length; }
-
-		/** The object that contains the signal. */
-		public function get target():* { return _target; }
-
-		/**
-		 *
-		 */
-		public function get eventClass():Class { return _eventClass; }
-
-		/**
-		 * Subscribes a listener for the signal.
-		 * @param	listener A function with a single argument
-		 * that matches the type of event dispatched by the signal.
-		 */
-		public function add(listener:Function):void
-		{
-			if (!listener.length) throw new ArgumentError('Missing argument in listener function.');
-			if (listeners.indexOf(listener) >= 0) return; // Don't add same listener twice.
-			listeners.push(listener);
-		}
-
-		/**
-		 * Subscribes a one-time listener for this signal.
-		 * The signal will remove the listener automatically the first time it is called.
-		 * @param	listener A function with a single argument
-		 * that matches the type of event dispatched by the signal.
-		 */
-		public function addOnce(listener:Function):void
-		{
-			onceListeners[listener] = true;
-			add(listener);
-		}
-
-		/**
-		 * Unsubscribes a listener from the signal.
-		 * @param	listener
-		 */
-		public function remove(listener:Function):void
-		{
-			listeners.splice(listeners.indexOf(listener), 1);
-			delete onceListeners[listener];
-		}
-
-		/**
-		 * Dispatches an object to the signal's listeners.
-		 * @param	eventObject Any object, but an IEvent will take advantage of targeting and bubbling.
-		 */
-		public function dispatch(eventObject:Object):void
-		{
-			if (!eventObject)
-				throw new ArgumentError('Null argument passed to dispatch().');
-
-			if (_eventClass && !(eventObject is _eventClass))
-				throw new TypeError('Incompatible event type passed to dispatch().');
-
-			var event:IEvent = eventObject as IEvent;
-			if (event)
-			{
-				var eventTarget:* = event.target;
-				//TODO: test cloning in a scenario
-				if (eventTarget)
-				{
-					eventObject = event = event.clone();
-				}
-				event.target = eventTarget || this.target;
-				event.currentTarget = this.target;
-				event.signal = this;
-				if (!listeners.length && event.bubbles)
-				{
-					var bubbler:IEventBubbler = this.target.parent as IEventBubbler;
-					if (bubbler) bubbler.onEventBubbled(event);
-					return;
-				}
-			}
-			if (!listeners.length) return; // exit early and avoid cloning array
-
-			// Clone listeners array because add/remove may occur during the dispatch.
-			for each (var listener:Function in listeners.concat())
-			{
-				if (onceListeners[listener]) remove(listener);
-				listener(eventObject);
-			}
-		}
-
-		/** Unsubscribes all listeners from the signal. */
-		public function removeAll():void
-		{
-			listeners.length = 0;
-		}
-
-	}
-}


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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableContainerBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableContainerBaseAutomationImpl.as
@@ -0,0 +1,146 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.automation.delegates.components.supportClasses
+{
+	import flash.display.DisplayObject;
+
+	import mx.automation.Automation;
+	import mx.core.mx_internal;
+
+	import spark.components.Scroller;
+	import spark.components.supportClasses.GroupBase;
+	import spark.components.supportClasses.SkinnableContainerBase;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  SkinnableContainerBase control.
+	 *
+	 *  @see spark.components.supportClasses.SkinnableContainerBase
+	 *
+	 */
+	public class SparkSkinnableContainerBaseAutomationImpl extends SparkSkinnableComponentAutomationImpl
+	{
+
+		include "../../../../core/Version.as";
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.components.supportClasses.SkinnableContainerBase, SparkSkinnableContainerBaseAutomationImpl);
+		}
+
+		/**
+		 *  Constructor.
+		 * @param obj SkinnableContainerBase object to be automated.
+		 */
+		public function SparkSkinnableContainerBaseAutomationImpl(obj:spark.components.supportClasses.SkinnableContainerBase)
+		{
+			super(obj);
+
+		}
+
+
+		/**
+		 *  @private
+		 */
+		private function get containerBase():SkinnableContainerBase
+		{
+			return uiComponent as SkinnableContainerBase;
+		}
+
+		/**
+		 * private
+		 */
+		protected function getScrollBars(passedObj:Object, stopWithContetGroup:GroupBase):Array
+		{
+			var scroller:spark.components.Scroller = null;
+			if(passedObj)
+				scroller = getScroller(passedObj,stopWithContetGroup);
+			else
+				scroller = getScroller(containerBase,stopWithContetGroup);
+
+			if(scroller)
+			{
+				var tempArray:Array = new Array();
+				if(scroller.horizontalScrollBar && scroller.horizontalScrollBar.visible)
+					tempArray.push(scroller.horizontalScrollBar);
+				if(scroller.verticalScrollBar && scroller.verticalScrollBar.visible)
+					tempArray.push(scroller.verticalScrollBar);
+
+			}
+			return tempArray;
+
+		}
+
+		/**
+		 * private
+		 */
+		protected function getScroller(passedObj:Object, stopWithContentGroup:GroupBase):spark.components.Scroller
+		{
+
+			if(passedObj)
+			{
+				if( !(passedObj.hasOwnProperty("numChildren") &&
+					passedObj.hasOwnProperty("getChildAt")))
+					return null;
+			}
+
+			var requiredObject:Object = null;
+			if(passedObj)
+				requiredObject = passedObj;
+			else
+				// just to ensure that if no object is passed, we will consider it on the
+				// current object.
+				requiredObject = containerBase;
+
+			var n:int = requiredObject.numChildren;
+
+			var obj:Object;
+			for (var i:int = 0; i<n ; i++)
+			{
+				obj  =  requiredObject.getChildAt(i);
+
+				if(obj is spark.components.Scroller)
+					return obj as spark.components.Scroller;
+
+				// check whether we need to proceed with the element to dig further
+				// if it is a skin we need to proceed.
+				// if the object corresponds to our contentGroup, we need not proceed further
+				if(stopWithContentGroup &&(obj == stopWithContentGroup))
+					continue;
+				do
+				{
+					obj = getScroller(obj,stopWithContentGroup);
+				}while(obj && !(obj is spark.components.Scroller))
+
+				if(obj is spark.components.Scroller)
+					return obj as spark.components.Scroller;
+			}
+			return null;
+		}
+
+	}
+
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.skins.halo
 {


only post call if there are queued calls

git-svn-id: 8a2ccb88241e16c78017770bc38d91d6d5396a5a@58526 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- generator/sources/as3/KalturaClient.as
+++ generator/sources/as3/KalturaClient.as
@@ -114,8 +114,10 @@
 		 * post all calls in the queue and reset it.
 		 */
 		public function flush():void {
-			post(_queue);
-			_queue = null;
+			if (_queue) {
+				post(_queue);
+				_queue = null;
+			}
 		}


Slider was not producing valueChanged events.

--- frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
+++ frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
@@ -27,6 +27,8 @@
 	import org.apache.flex.core.IRangeModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.html.staticControls.beads.ISliderView;

 	public class SliderMouseController implements IBead, IBeadController
@@ -82,6 +84,8 @@
 		{
 			UIBase(_strand).stage.removeEventListener(MouseEvent.MOUSE_MOVE, thumbMoveHandler);
 			UIBase(_strand).stage.removeEventListener(MouseEvent.MOUSE_UP, thumbUpHandler);
+
+			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
 		}

 		private var origin:Point;
@@ -107,6 +111,8 @@
 			sliderView.thumb.x = newX - sliderView.thumb.width/2;

 			rangeModel.value = n;
+
+			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
 		}

 		private function trackClickHandler( event:MouseEvent ) : void
@@ -127,6 +133,8 @@
 			sliderView.thumb.x = xloc - sliderView.thumb.width/2;

 			rangeModel.value = n;
+
+			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
 		}
 	}
 }


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

--- frameworks/projects/automation_air/src/mx/automation/delegates/containers/WindowsAutomationImpl.as
+++ frameworks/projects/automation_air/src/mx/automation/delegates/containers/WindowsAutomationImpl.as
@@ -0,0 +1,178 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.containers
+{
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationManager2;
+	import mx.automation.IAutomationObject;
+	import mx.automation.delegates.core.ContainerAutomationImpl;
+	import mx.core.Window;
+
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines the methods and properties required to perform instrumentation for the
+	 *  Canvas class.
+	 *
+	 *  @see mx.containers.Canvas
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 4
+	 */
+	public class WindowsAutomationImpl extends ContainerAutomationImpl
+	{
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(Window, WindowsAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj Canvas object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function WindowsAutomationImpl(obj:Window)
+		{
+			super(obj);
+			obj.showInAutomationHierarchy = true;
+			if (obj.menu) // a menu already exists for this window
+				menuChangeHandler(null);
+
+			obj.addEventListener("menuChanged", menuChangeHandler);
+			recordClick = true;
+		}
+
+
+		/**
+		 *  @private
+		 */
+		public function get window():Window
+		{
+			return  uiComponent as Window;
+		}
+		/**
+		 *  @private
+		 */
+		override public function get automationName():String
+		{
+			var am:IAutomationManager2 = Automation.automationManager2;
+			return am.getAirWindowUniqueId(window);
+		}
+
+		/**
+		 * @private
+		 */
+		override public function get numAutomationChildren():int
+		{
+			//FlexNativeMenu can also be child of Window.
+			//So this is added if it exists. We are doing this only for Window and
+			//WindowedApplication because at present we receive menuChanged
+			//event only on these 2 controls if a FlexNativeMenu is there
+			var count:int = super.numAutomationChildren;
+			if (window.menu)
+				return(count + 1);
+			else
+				return count;
+		}
+
+
+		override public function getAutomationChildAt(index:int):IAutomationObject
+		{
+			//FlexNativeMenu can also be child of Window.
+			//So if it exists, it is considered to be the first child.
+			// We are doing this only for Window and
+			//WindowedApplication because at present we receive menuChanged
+			//event only on these 2 controls if a FlexNativeMenu is there
+			if (window.menu)
+			{
+				if (index == 0)
+					return window.menu as IAutomationObject;
+				index = index - 1;
+			}
+			return super.getAutomationChildAt(index);
+		}
+
+		/**
+		 * @private
+		 */
+		override public function getAutomationChildren():Array
+		{
+			var childList:Array = new Array();
+
+			// add the menu as the first element
+			if (window.menu )
+				childList.push(window.menu as IAutomationObject);
+
+			var tempList:Array = super.getAutomationChildren();
+			if (tempList)
+			{
+				var n:int = tempList.length;
+				for (var i:int = 0; i < n; i++)
+				{
+					childList.push(tempList[i] as IAutomationObject);
+				}
+			}
+
+			return childList;
+		}
+
+		//--------------------------------------------------------------------------------
+		//
+		// Methods
+		//
+		//--------------------------------------------------------------------------------
+		/**
+		 * @private
+		 */
+		private function menuChangeHandler(event:Event):void
+		{
+			Automation.automationManager2.registerNewFlexNativeMenu(window.menu, window.systemManager as DisplayObject);
+
+		}
+
+	}
+
+}


RTMP.as: fix identation, add first callback

--- src/RTMP.as
+++ src/RTMP.as
@@ -1,42 +1,45 @@
-package
-{
-	import flash.display.Sprite;
+package {
+  import flash.display.Sprite;
+  import flash.external.ExternalInterface;

-	import org.osmf.containers.MediaContainer;
-	import org.osmf.elements.VideoElement;
-	import org.osmf.media.DefaultMediaFactory;
-	import org.osmf.media.MediaElement;
-	import org.osmf.media.MediaPlayer;
-	import org.osmf.media.URLResource;
+  import org.osmf.containers.MediaContainer;
+  import org.osmf.elements.VideoElement;
+  import org.osmf.media.DefaultMediaFactory;
+  import org.osmf.media.MediaElement;
+  import org.osmf.media.MediaPlayer;
+  import org.osmf.media.URLResource;

-	[SWF( width="640", height="360" )]
-	public class RTMP extends Sprite
-	{
-		public function RTMP()
-		{
-			// Store the URL
-			var videoPath:String = "rtmp://cp67126.edgefcs.net/ondemand/mediapm/strobe/content/test/SpaceAloneHD_sounas_640_500_short";
+  [SWF(width="640", height="360")]
+  public class RTMP extends Sprite {
+    private var playbackId:String;
+    private var mediaFactory:DefaultMediaFactory;
+    private var mediaContainer:MediaContainer;

-			// Create a resource
-			var resource:URLResource = new URLResource( videoPath );
+    public function RTMP() {
+      playbackId = this.root.loaderInfo.parameters.playbackId;
+      mediaFactory = new DefaultMediaFactory();
+      mediaContainer = new MediaContainer();

-			// Create a mediafactory instance
-			var mediaFactory:DefaultMediaFactory = new DefaultMediaFactory();
+      setupCallbacks();
+      _triggerEvent('flashready');
+      ExternalInterface.call('console.log', 'clappr rtmp 0.0-alpha');
+    }

-			// Create a MediaElement
-			//var element:VideoElement = new VideoElement( resource );
-			var element:MediaElement = mediaFactory.createMediaElement( resource );
+    private function setupCallbacks():void {
+      ExternalInterface.addCallback("playerPlay", play);
+    }

-			// Create a media player
-			var mediaPlayer:MediaPlayer = new MediaPlayer( element );
+    private function play(url:String):void {
+      ExternalInterface.call('console.log', 'playing ' + url);
+      var resource:URLResource = new URLResource(url);
+      var element:MediaElement = mediaFactory.createMediaElement(resource);
+      var mediaPlayer:MediaPlayer = new MediaPlayer(element);
+      mediaContainer.addMediaElement(element);
+      addChild(mediaContainer);
+    }

-			// Create a media container & add the MediaElement
-			var mediaContainer:MediaContainer = new MediaContainer();
-			mediaContainer.addMediaElement( element );
-
-			// Add the container to the display list
-			addChild( mediaContainer );
-
-		}
-	}
+    private function _triggerEvent(name: String):void {
+      ExternalInterface.call('Clappr.Mediator.trigger("' + playbackId + ':' + name +'")');
+    }
+  }
 }


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

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumnGroup.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  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
+//
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Image, Flash: Handle improperly encoded ExifVersion tag.

--- src/flash/src/mxi/image/ExifParser.as
+++ src/flash/src/mxi/image/ExifParser.as
@@ -210,9 +210,13 @@

 			// fix formatting of some tags
 			if (Exif.hasOwnProperty('ExifVersion') && Exif.ExifVersion is Array) {
-				for (var i:uint = 0, exifVersion:String = ''; i < Exif.ExifVersion.length; i++) {
-					exifVersion += String.fromCharCode(Exif.ExifVersion[i]);
-				}
+				var ch:String, exifVersion:String = '';
+				for (var i:uint = 0; i < Exif.ExifVersion.length; i++) {
+					ch = String.fromCharCode(Exif.ExifVersion[i]);
+					if (/[\d\w]+/.test(ch)) { // ignore weird values
+						exifVersion += ch;
+					}
+				}
 				Exif.ExifVersion = exifVersion;
 			}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.advancedDataGridClasses
 {


Fixed editor.

Fixed editor.

--- Bin/Data/Scripts/Editor/EditorView.as
+++ Bin/Data/Scripts/Editor/EditorView.as
@@ -77,6 +77,7 @@
     // Note: the camera will not be bound into the scene, so that it is not listed, and does not get deleted
     cameraNode = Node();
     camera = cameraNode.CreateComponent("Camera");
+    audio.listener = cameraNode.CreateComponent("SoundListener");
     ResetCamera();

     renderer.viewports[0] = Viewport(editorScene, camera);
@@ -160,10 +161,6 @@

 void UpdateView()
 {
-    // Update audio listener
-    audio.listenerPosition = cameraNode.position;
-    audio.listenerRotation = cameraNode.rotation;
-
     // Update camera fill mode
     camera.fillMode = fillMode;
 }


Bug 666215: Fix DST issue when running in India (r=dschaffe,r=lhansen).

--- test/acceptance/shell.as
+++ test/acceptance/shell.as
@@ -320,6 +320,8 @@
 var msPerHour =         3600000;    //  msPerMinute * MinutesPerHour
 var TZ_DIFF = getTimeZoneDiff();  // offset of tester's timezone from UTC
 var             TZ_PST = -8;  // offset of Pacific Standard Time from UTC
+var             TZ_IST = +5.5; // offset of Indian Standard Time from UTC
+var             IST_DIFF = TZ_DIFF - TZ_IST;  // offset of tester's timezone from IST
 var             PST_DIFF = TZ_DIFF - TZ_PST;  // offset of tester's timezone from PST
 var TIME_1970    = 0;
 var TIME_2000    = 946684800000;
@@ -590,6 +592,10 @@
 }

 function DaylightSavingTA( t ) {
+    // There is no Daylight saving time in India
+    if (IST_DIFF == 0)
+        return 0;
+
     var dst_start;
     var dst_end;
     // Windows fix for 2007 DST change made all previous years follow new DST rules


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package spark.automation.delegates.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22748
Author:   smgilson@adobe.com
Date:     2011-09-27T18:42:22.924602Z

Log Message:
-----------
ASDoc fixes for watson bug #2983829

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_flashflexkit/src/mx/automation/delegates/flashflexkit/ContainerMovieClipAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_flashflexkit/src/mx/automation/delegates/flashflexkit/UIMovieClipAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/automation_flashflexkit/src/mx/automation/delegates/flashflexkit/FlexContentHolderAutomationImpl.as</path>

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

--- frameworks/projects/automation_flashflexkit/src/mx/automation/delegates/flashflexkit/ContainerMovieClipAutomationImpl.as
+++ frameworks/projects/automation_flashflexkit/src/mx/automation/delegates/flashflexkit/ContainerMovieClipAutomationImpl.as
@@ -12,197 +12,197 @@

 package mx.automation.delegates.flashflexkit
 {
-	import flash.display.DisplayObject;
-
-	import mx.automation.Automation;
-	import mx.automation.IAutomationObject;
-	import mx.automation.IAutomationObjectHelper;
-	import mx.core.IUIComponent;
-	import mx.core.mx_internal;
-	import mx.flash.ContainerMovieClip;
-	use namespace mx_internal;
-
-	[Mixin]
-	/**
-	 *
-	 *  Defines methods and properties required to perform instrumentation for the
-	 *  ContainerMovieClip control.
-	 *
-	 *  @see mx.flash.ContainerMovieClip;
-	 *
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	public class  ContainerMovieClipAutomationImpl  extends UIMovieClipAutomationImpl
-	{
-		include "../../../core/Version.as";
-
-		//--------------------------------------------------------------------------
-		//
-		//  Class methods
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  Registers the delegate class for a component class with automation manager.
-		 *
-		 *  @param root The SystemManger of the application.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 3
-		 */
-		public static function init(root:DisplayObject):void
-		{
-			Automation.registerDelegateClass(ContainerMovieClip, ContainerMovieClipAutomationImpl);
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Constructor
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  Constructor.
-		 * @param obj Panel object to be automated.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 3
-		 */
-		public function ContainerMovieClipAutomationImpl(obj:ContainerMovieClip)
-		{
-			super(obj);
-			recordClick = true;
-		}
-
-
-		/**
-		 *  @private
-		 *  storage for the owner component
-		 */
-		protected function get containerMovieClip():ContainerMovieClip
-		{
-			return movieClip as ContainerMovieClip;
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Overridden properties
-		//
-		//--------------------------------------------------------------------------
-
-		//----------------------------------
-		//  automationName
-		//----------------------------------
-
-		/**
-		 *  @private
-		 */
-		override public function get automationName():String
-		{
-			return super.automationName;
-		}
-
-		/**
-		 *  @private
-		 */
-		override public function get automationValue():Array
-		{
-			return [ automationName ];
-		}
-
-		//----------------------------------
-		//  numAutomationChildren
-		//----------------------------------
-
-		/**
-		 *  @private
-		 */
-		override public function get numAutomationChildren():int
-		{
-			// Always the Flash container can have only one child which is the
-			// Flex ContentHolder. It is always like this.
-			// So there is only automationChild for the ContainerMovieClip
-			return 1;
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Overridden methods
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  @private
-		 */
-		override public function getAutomationChildAt(index:int):IAutomationObject
-		{
-			// there is only one AutomationChild for the CotnainerMoovieClip
-			// which is FlexContentHolder
-			// there is no mehtod to get this directly. Content reurns the flex object
-			// which is added to the FlexContentHolder. So we need to get the child by
-			// getting the parent of the the content.
-			// once we have a direct method in UIMovieClip to get the FlexContent holder
-			// we need to call that
-			if (index == 0)
-			{
-				var contentObj:IUIComponent = containerMovieClip.content as IUIComponent;
-				return contentObj.parent as IAutomationObject;
-			}
-
-			return null;
-		}
-
-		/**
-		 *  @private
-		 */
-		override public function getAutomationChildren():Array
-		{
-			// there is only one AutomationChild for the CotnainerMoovieClip
-			// which is FlexContentHolder
-			// there is no mehtod to get this directly. Content reurns the flex object
-			// which is added to the FlexContentHolder. So we need to get the child by
-			// getting the parent of the the content.
-			// once we have a direct method in UIMovieClip to get the FlexContent holder
-			// we need to call that
-			var contentObj:IUIComponent = containerMovieClip.content as IUIComponent;
-			return [contentObj.parent as IAutomationObject];
-		}
-
-		/**
-		 *  @private
-		 */
-		override public function createAutomationIDPart(child:IAutomationObject):Object
-		{
-			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-			return help.helpCreateIDPart(uiAutomationObject, child);
-		}
-
-		/**
-		 *  @private
-		 */
-		override public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
-		{
-			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-			return help.helpCreateIDPartWithRequiredProperties(uiAutomationObject, child,properties);
-		}
-
-		/**
-		 *  @private
-		 */
-		override public function resolveAutomationIDPart(part:Object):Array
-		{
-			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-			return help.helpResolveIDPart(uiAutomationObject, part);
-		}
-	}
+    import flash.display.DisplayObject;
+
+    import mx.automation.Automation;
+    import mx.automation.IAutomationObject;
+    import mx.automation.IAutomationObjectHelper;
+    import mx.core.IUIComponent;
+    import mx.core.mx_internal;
+    import mx.flash.ContainerMovieClip;
+    use namespace mx_internal;
+
+    [Mixin]
+    /**
+     *
+     *  Defines methods and properties required to perform instrumentation for the
+     *  ContainerMovieClip control.
+     *
+     *  @see mx.flash.ContainerMovieClip
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public class  ContainerMovieClipAutomationImpl  extends UIMovieClipAutomationImpl
+    {
+        include "../../../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Registers the delegate class for a component class with automation manager.
+         *
+         *  @param root The SystemManger of the application.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function init(root:DisplayObject):void
+        {
+            Automation.registerDelegateClass(ContainerMovieClip, ContainerMovieClipAutomationImpl);
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Constructor.
+         * @param obj Panel object to be automated.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public function ContainerMovieClipAutomationImpl(obj:ContainerMovieClip)
+        {
+            super(obj);
+            recordClick = true;
+        }
+
+
+        /**
+         *  @private
+         *  storage for the owner component
+         */
+        protected function get containerMovieClip():ContainerMovieClip
+        {
+            return movieClip as ContainerMovieClip;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden properties
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  automationName
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        override public function get automationName():String
+        {
+            return super.automationName;
+        }
+
+        /**
+         *  @private
+         */
+        override public function get automationValue():Array
+        {
+            return [ automationName ];
+        }
+
+        //----------------------------------
+        //  numAutomationChildren
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        override public function get numAutomationChildren():int
+        {
+            // Always the Flash container can have only one child which is the
+            // Flex ContentHolder. It is always like this.
+            // So there is only automationChild for the ContainerMovieClip
+            return 1;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        override public function getAutomationChildAt(index:int):IAutomationObject
+        {
+            // there is only one AutomationChild for the CotnainerMoovieClip
+            // which is FlexContentHolder
+            // there is no mehtod to get this directly. Content reurns the flex object
+            // which is added to the FlexContentHolder. So we need to get the child by
+            // getting the parent of the the content.
+            // once we have a direct method in UIMovieClip to get the FlexContent holder
+            // we need to call that
+            if (index == 0)
+            {
+                var contentObj:IUIComponent = containerMovieClip.content as IUIComponent;
+                return contentObj.parent as IAutomationObject;
+            }
+
+            return null;
+        }
+
+        /**
+         *  @private
+         */
+        override public function getAutomationChildren():Array
+        {
+            // there is only one AutomationChild for the CotnainerMoovieClip
+            // which is FlexContentHolder
+            // there is no mehtod to get this directly. Content reurns the flex object
+            // which is added to the FlexContentHolder. So we need to get the child by
+            // getting the parent of the the content.
+            // once we have a direct method in UIMovieClip to get the FlexContent holder
+            // we need to call that
+            var contentObj:IUIComponent = containerMovieClip.content as IUIComponent;
+            return [contentObj.parent as IAutomationObject];
+        }
+
+        /**
+         *  @private
+         */
+        override public function createAutomationIDPart(child:IAutomationObject):Object
+        {
+            var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+            return help.helpCreateIDPart(uiAutomationObject, child);
+        }
+
+        /**
+         *  @private
+         */
+        override public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
+        {
+            var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+            return help.helpCreateIDPartWithRequiredProperties(uiAutomationObject, child,properties);
+        }
+
+        /**
+         *  @private
+         */
+        override public function resolveAutomationIDPart(part:Object):Array
+        {
+            var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+            return help.helpResolveIDPart(uiAutomationObject, part);
+        }
+    }
 }


Let's use presents.dobj.EventListener (and expose a public function- oh well)
and just handle all events in one place, greatly reducing line count
and at the same time handling changes other than AttributeChangedEvents
to the "refreshFields".

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

--- src/as/com/threerings/flex/DSetList.as
+++ src/as/com/threerings/flex/DSetList.as
@@ -14,19 +14,21 @@
 import com.threerings.util.Util;

 import com.threerings.presents.dobj.AttributeChangedEvent;
-import com.threerings.presents.dobj.AttributeChangeAdapter;
+import com.threerings.presents.dobj.DEvent;
 import com.threerings.presents.dobj.DObject;
 import com.threerings.presents.dobj.DSet;
 import com.threerings.presents.dobj.DSet_Entry;
 import com.threerings.presents.dobj.EntryAddedEvent;
 import com.threerings.presents.dobj.EntryUpdatedEvent;
 import com.threerings.presents.dobj.EntryRemovedEvent;
-import com.threerings.presents.dobj.SetAdapter;
+import com.threerings.presents.dobj.EventListener;
+import com.threerings.presents.dobj.NamedEvent;

 /**
  * A list that renders the contents of a DSet.
  */
 public class DSetList extends List
+    implements EventListener
 {
     public function DSetList (
         renderer :IFactory, sortFn :Function = null, filterFn :Function = null)
@@ -79,10 +81,7 @@
         _object = object;
         _field = field;
         _refreshFields = refreshFields;
-        _attrListener = new AttributeChangeAdapter(attrChanged);
-        _setListener = new SetAdapter(entryAdded, entryUpdated, entryRemoved);
-        _object.addListener(_attrListener);
-        _object.addListener(_setListener);
+        _object.addListener(this);

         setEntries(_object[_field] as DSet);
     }
@@ -92,11 +91,8 @@
      */
     public function shutdown () :void
     {
-        if (_attrListener != null) {
-            _object.removeListener(_attrListener);
-            _object.removeListener(_setListener);
-            _attrListener = null;
-            _setListener = null;
+        if (_object != null) {
+            _object.removeListener(this);
             _object = null;
             _field = null;
             _refreshFields = null;
@@ -113,58 +109,42 @@
     }

     /**
-     * Handle a change to the entire set.
+     * From com.threerings.presents.dobj.EventListener. Not actually part of the public API.
      */
-    protected function attrChanged (event :AttributeChangedEvent) :void
+    public function eventReceived (event :DEvent) :void
     {
-        var name :String = event.getName();
+        if (!(event is NamedEvent)) {
+            return;
+        }
+        var name :String = NamedEvent(event).getName();
         if (name == _field) {
-            setEntries(event.getValue() as DSet);
+            if (event is EntryAddedEvent) {
+                _data.list.addItem(EntryAddedEvent(event).getEntry());

-        } else if (_refreshFields.indexOf(name) != -1) {
-            refresh();
+            } else if (event is EntryUpdatedEvent) {
+                var entry :DSet_Entry = EntryUpdatedEvent(event).getEntry();
+                var upIdx :int = findKeyIndex(entry.getKey());
+                if (upIdx != -1) {
+                    _data.list.setItemAt(entry, upIdx);
+                }
+
+            } else if (event is EntryRemovedEvent) {
+                var remIdx :int = findKeyIndex(EntryRemovedEvent(event).getKey());
+                if (remIdx != -1) {
+                    _data.list.removeItemAt(remIdx);
+                }
+
+            } else if (event is AttributeChangedEvent) {
+                setEntries(AttributeChangedEvent(event).getValue() as DSet);
+                return; // skip the full refresh
+            }
+
+        } else if (-1 == _refreshFields.indexOf(name)) {
+            return; // this name is not our concern: do nothing
         }
-    }

-    /**
-     * Handle an addition to the set.
-     */
-    protected function entryAdded (event :EntryAddedEvent) :void
-    {
-        if (event.getName() == _field) {
-            _data.list.addItem(event.getEntry());
-            refresh();
-        }
-    }
-
-    /**
-     * Handle an update to the set.
-     */
-    protected function entryUpdated (event :EntryUpdatedEvent) :void
-    {
-        if (event.getName() == _field) {
-            var entry :DSet_Entry = event.getEntry();
-            var idx :int = findKeyIndex(entry.getKey());
-            if (idx == -1) {
-                throw new Error();
-            }
-            _data.list.setItemAt(entry, idx);
-            refresh();
-        }
-    }
-
-    /**
-     * Handle a removal from the set.
-     */
-    protected function entryRemoved (event :EntryRemovedEvent) :void
-    {
-        if (event.getName() == _field) {
-            var idx :int = findKeyIndex(event.getKey());
-            if (idx != -1) {
-                _data.list.removeItemAt(idx);
-                refresh();
-            }
-        }
+        // we reach this line if the event was for a _refreshField, or a Set event on _field
+        refresh();
     }

     /**
@@ -192,9 +172,5 @@

     /** Fields on which to watch for updates and call refresh(). */
     protected var _refreshFields :Array;
-
-    /** Our listeners, so that we don't junk-up our public interface. */
-    protected var _attrListener :AttributeChangeAdapter;
-    protected var _setListener :SetAdapter;
 }
 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultItemRendererAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultItemRendererAutomationImpl.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package spark.automation.delegates.skins.spark
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 14483
Author:   smgilson@adobe.com
Date:     2010-03-01T19:01:18.459430Z

Log Message:
-----------
merge 14456: Adding ASDoc version tags classes

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/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkRangeAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkRadioButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkPanelAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarAutomationImpl.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/automation/air/AirFunctionsHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkSkinnableContainerAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/events/SparkValueChangeAutomationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBarBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkNavigatorContentAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGroupAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkTrackBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/events/EventDetails.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/events/SparkListItemSelectEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTabBarAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkGroupAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableContainerBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/mediaClasses/SparkMuteButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/automation/air/AirDragManagerAutomationHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/SOAPResult.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkTextBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTitleWindowAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkTileGroupAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkToggleButtonAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkSpinnerAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccConst.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkLabelAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkBorderContainerAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkGroupBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkVideoPlayerAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkSkinnableComponentAutomationImpl.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/mediaClasses/SparkMuteButtonAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/mediaClasses/SparkMuteButtonAutomationImpl.as
@@ -33,12 +33,16 @@
  *  MuteButton control.
  *
  *  @see spark.components.mediaClasses.MuteButton
- *
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class SparkMuteButtonAutomationImpl extends SparkButtonAutomationImpl
 {

-	include "../../../../core/Version.as";
+    include "../../../../core/Version.as";
     //--------------------------------------------------------------------------
     //
     //  Class methods
@@ -49,6 +53,11 @@
      *  Registers the delegate class for a component class with automation manager.
      *
      *  @param root The SystemManger of the application.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public static function init(root:DisplayObject):void
     {
@@ -58,60 +67,68 @@
     /**
      *  Constructor.
      * @param obj MuteButton object to be automated.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function SparkMuteButtonAutomationImpl(obj:spark.components.mediaClasses.MuteButton)
     {
         super(obj);
-		obj.addEventListener(FlexEvent.MUTED_CHANGE , muteChangeHandler, false, 0, true);
-		obj.addEventListener(AutomationRecordEvent.RECORD, recordHandler,false,0,true);
+        obj.addEventListener(FlexEvent.MUTED_CHANGE , muteChangeHandler, false, 0, true);
+        obj.addEventListener(AutomationRecordEvent.RECORD, recordHandler,false,0,true);

     }
-
-
-	/**
-	 *  @private
-	 */
-
-	private function recordHandler(event:AutomationRecordEvent):void
-	{
-		// let us not record the click event.
-		var re:Event = event.replayableEvent;
-		if((re is MouseEvent) && (re.type == MouseEvent.CLICK))
-			event.preventDefault();
-	}
+
+
+    /**
+     *  @private
+     */
+
+    private function recordHandler(event:AutomationRecordEvent):void
+    {
+        // let us not record the click event.
+        var re:Event = event.replayableEvent;
+        if((re is MouseEvent) && (re.type == MouseEvent.CLICK))
+            event.preventDefault();
+    }

-
-	/**
-	 *  @private
-	 */
-	private function muteChangeHandler(event:mx.events.FlexEvent):void
-	{
-		recordAutomatableEvent(event);
-	}
-
-	override public function replayAutomatableEvent(event:Event):Boolean
-	{
-		var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-
-		if (event is mx.events.FlexEvent)
-		{
-			// we need to replay the click on the muteButton
-			if(event.type == FlexEvent.MUTED_CHANGE)
-			{
-				help.replayClick(sparkMuteButton);
-			}
-		}
-		return super.replayAutomatableEvent(event);
-	}
-
-	/**
-	 *  @private
-	 *  storage for the owner component
-	 */
-	protected function get sparkMuteButton():spark.components.mediaClasses.MuteButton
-	{
-		return uiComponent as spark.components.mediaClasses.MuteButton;
-	}
+
+    /**
+     *  @private
+     */
+    private function muteChangeHandler(event:mx.events.FlexEvent):void
+    {
+        recordAutomatableEvent(event);
+    }
+
+    /**
+     *  @private
+     */
+    override public function replayAutomatableEvent(event:Event):Boolean
+    {
+        var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+
+        if (event is mx.events.FlexEvent)
+        {
+            // we need to replay the click on the muteButton
+            if(event.type == FlexEvent.MUTED_CHANGE)
+            {
+                help.replayClick(sparkMuteButton);
+            }
+        }
+        return super.replayAutomatableEvent(event);
+    }
+
+    /**
+     *  @private
+     *  storage for the owner component
+     */
+    protected function get sparkMuteButton():spark.components.mediaClasses.MuteButton
+    {
+        return uiComponent as spark.components.mediaClasses.MuteButton;
+    }

 }


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

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


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

--- frameworks/projects/charts/src/mx/charts/HitData.as
+++ frameworks/projects/charts/src/mx/charts/HitData.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  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
+//
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Refactor Path

Refactor Path

--- src/main/org/shypl/common/util/Path.as
+++ src/main/org/shypl/common/util/Path.as
@@ -33,7 +33,7 @@
 			return _value === null;
 		}

-		protected function get value():String {
+		public function get value():String {
 			return _value;
 		}


Argh. I've lost track of how many stupid things I've done today.

--- tamarin-central/thane/as3src/Thane.as
+++ tamarin-central/thane/as3src/Thane.as
@@ -34,7 +34,9 @@
 {
     /* static */
     {
-        Thanette.systemSetup(httpClientFactory);
+        if (Thanette.isSystemDomain()) {
+            Thanette.systemSetup(httpClientFactory);
+        }
     }

     public static function spawnDomain (


don't js<->as3 marshallExeceptions (may break existing code)

--- src/org/hola/JSURLStream.as
+++ src/org/hola/JSURLStream.as
@@ -39,7 +39,11 @@
                 return;
             // Connect calls to JS.
             ZErr.log('JSURLStream init api');
+            /* XXX arik: setting this to true will pass js exceptions to
+             * as3 and as3 exceptions to js. this may break current customer
+             * code
             ExternalInterface.marshallExceptions = true;
+            */
             ExternalInterface.addCallback('hola_onFragmentData',
                 hola_onFragmentData);
             js_api_inited = true;


Require the 'processed' function. If you are calling a ResultListener service,
you should always listen for the result! Otherwise, you are likely doing
something wrong. Listen for the result, or change the service to not report
a result if it's irrelevant.

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

--- src/as/com/threerings/presents/client/ResultWrapper.as
+++ src/as/com/threerings/presents/client/ResultWrapper.as
@@ -30,8 +30,7 @@
 public class ResultWrapper extends InvocationAdapter
     implements InvocationService_ResultListener
 {
-    public function ResultWrapper (
-        failed :Function, processed :Function = null)
+    public function ResultWrapper (failed :Function, processed :Function)
     {
         super(failed);
         _processed = processed;
@@ -40,9 +39,7 @@
     // documentation inherited from interface ResultListener
     public function requestProcessed (result :Object) :void
     {
-        if (_processed != null) {
-            _processed(result);
-        }
+        _processed(result);
     }

     protected var _processed :Function;


Fixed fixed width font rendering bug in BitmapFont2D.

--- src/engine/tetragon/view/render2d/text/BitmapFont2D.as
+++ src/engine/tetragon/view/render2d/text/BitmapFont2D.as
@@ -32,13 +32,14 @@
 	import tetragon.view.render2d.display.QuadBatch2D;
 	import tetragon.view.render2d.display.Sprite2D;
 	import tetragon.view.render2d.textures.Texture2D;
-	import tetragon.view.render2d.textures.TextureSmoothing2D;

 	import com.hexagonstar.constants.HAlign;
+	import com.hexagonstar.constants.TextureSmoothing;
 	import com.hexagonstar.constants.VAlign;

 	import flash.geom.Rectangle;
 	import flash.utils.Dictionary;
+

 	/** The BitmapFont class parses bitmap font files and arranges the glyphs
 	 *  in the form of a text.
@@ -93,13 +94,13 @@

 		/** Creates a bitmap font by parsing an XML file and uses the specified texture.
 		 *  If you don't pass any data, the "mini" font will be created. */
-		public function BitmapFont2D(texture:Texture2D = null, fontXML:XML = null)
+		public function BitmapFont2D(texture:Texture2D = null, fontXml:XML = null)
 		{
 			// if no texture is passed in, we create the minimal, embedded font
-			if (texture == null && fontXML == null)
+			if (texture == null && fontXml == null)
 			{
 				texture = MiniBitmapFont2D.texture;
-				fontXML = MiniBitmapFont2D.xml;
+				fontXml = MiniBitmapFont2D.xml;
 			}

 			mName = "unknown";
@@ -109,7 +110,7 @@
 			mHelperImage = new Image2D(texture);
 			mCharLocationPool = new <CharLocation>[];

-			if (fontXML) parseFontXml(fontXML);
+			if (fontXml) parseFontXml(fontXml);
 		}

@@ -132,11 +133,11 @@
 			mBaseline = parseFloat(fontXml.common.attribute("base")) / scale;

 			if (fontXml.info.attribute("smooth").toString() == "0")
-				smoothing = TextureSmoothing2D.NONE;
+				smoothing = TextureSmoothing.NONE;

 			if (mSize <= 0)
 			{
-				trace("[Render2D] Warning: invalid font size in '" + mName + "' font.");
+				trace("[Starling] Warning: invalid font size in '" + mName + "' font.");
 				mSize = (mSize == 0.0 ? 16.0 : mSize * -1.0);
 			}

@@ -271,7 +272,7 @@
 						}
 						else if (char == null)
 						{
-							trace("[Render2D] Missing character: " + charID);
+							trace("[Starling] Missing character: " + charID);
 						}
 						else
 						{
@@ -290,13 +291,6 @@

 							currentX += char.xAdvance;
 							lastCharID = charID;
-
-							if (currentLine.length == 1)
-							{
-								// the first character is not meant to have an xOffset
-								currentX -= char.xOffset;
-								charLocation.x -= char.xOffset;
-							}

 							if (charLocation.x + char.width > containerWidth)
 							{
@@ -371,9 +365,9 @@

 				if (numChars == 0) continue;

+				var xOffset:int = 0;
 				var lastLocation:CharLocation = line[line.length - 1];
-				var right:Number = lastLocation.x + lastLocation.char.width;
-				var xOffset:int = 0;
+				var right:Number = lastLocation.x - lastLocation.char.xOffset + lastLocation.char.xAdvance;

 				if (hAlign == HAlign.RIGHT) xOffset = containerWidth - right;
 				else if (hAlign == HAlign.CENTER) xOffset = (containerWidth - right) / 2;
@@ -444,6 +438,8 @@
 		}
 	}
 }
+
+
 import tetragon.view.render2d.text.BitmapChar2D;

 class CharLocation
@@ -458,4 +454,4 @@
 	{
 		this.char = char;
 	}
-}+}


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

--- frameworks/projects/framework/src/mx/events/ResourceEvent.as
+++ frameworks/projects/framework/src/mx/events/ResourceEvent.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//  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
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 2861
Author:   egeorgie@adobe.com
Date:     2008-08-15T23:52:48.544706Z

Log Message:
-----------
Add 'resizeMode' property to the Group. Setting this to "Scale" will turn on the 'resize-by-scale' behavior.

Reviewed by Glenn

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.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/flex4/src/flex/layout/LayoutItemUIC.as</path>

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

--- frameworks/projects/spark/src/spark/components/ResizeMode.as
+++ frameworks/projects/spark/src/spark/components/ResizeMode.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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 flex.core
+{
+
+/**
+ *  An enum of the modes a componennt fills in the dimensions
+ *  specified by the layout system.
+ *
+ *  For a given size the component may change it's own dimensions (width and eight)
+ *  and re-layout its children appropriately (this is the default resize mode).
+ *
+ *  Alternative option for the component is to  change its scale, in which case
+ *  the children don't need to change at all. This is supported by Group.
+ */
+public final class ResizeMode
+{
+    /**
+     *  Resize by changing width and height.
+     *
+     *  Component always sizes itself and lays out its children at the actual
+     *  size specified by the layout or the user.
+     */
+    public static const _NORMAL_UINT:uint = 0;
+    public static const NORMAL:String = "Normal";
+
+    /**
+     *  Resize by setting scaleX and scaleY.
+     *
+     *  Component always sizes itself and lays out children at at its measured
+     *  size. Scale is adjusted to match the specified size by the layour or
+     *  the user.
+     */
+    public static const _SCALE_UINT:uint = 1;
+    public static const SCALE:String = "Scale";
+
+    /**
+     *  Converts from the String to the uint
+     *  representation of the enum values.
+     */
+    public static function toUINT(value:String):uint
+    {
+        if (value == SCALE)
+            return _SCALE_UINT;
+        return _NORMAL_UINT;
+    }
+
+    /**
+     *  Converts from the uint to the String
+     *  representation of the enum values.
+     */
+    public static function toString(value:uint):String
+    {
+        if (value == _SCALE_UINT)
+            return SCALE;
+        return NORMAL;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/WipeDirection.as
+++ frameworks/projects/spark/src/spark/effects/WipeDirection.as
@@ -9,13 +9,13 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.effects
+package spark.effects
 {
 /**
  *  The WipeDirection class defines the values
- *  for the direction property of the FxWipe class.
+ *  for the direction property of the Wipe class.
  *
- *  @see mx.effects.FxWipe
+ *  @see mx.effects.Wipe
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


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

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


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

--- frameworks/projects/spark/src/spark/components/ButtonBarButton.as
+++ frameworks/projects/spark/src/spark/components/ButtonBarButton.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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 spark.components
 {