As usual, flash sucks and the NetStream object notifies us when it has seeked,
but reading the position value off the object returns the old position.
If we wait 1 frame we get the updated value.
Fuckers.

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

--- src/as/com/threerings/flash/video/FlvVideoPlayer.as
+++ src/as/com/threerings/flash/video/FlvVideoPlayer.as
@@ -25,6 +25,7 @@
 import flash.utils.Timer;

 import com.threerings.util.Log;
+import com.threerings.util.MethodQueue;
 import com.threerings.util.ValueEvent;

 public class FlvVideoPlayer extends EventDispatcher
@@ -189,7 +190,6 @@
         _vid.width = _size.x;
         _vid.height = _size.y;

-        log.debug("====> size known: " + _size);
         dispatchEvent(new ValueEvent(VideoPlayerCodes.SIZE, _size.clone()));
     }

@@ -232,7 +232,7 @@
             break;

         case "NetStream.Seek.Notify":
-            handlePositionCheck(null);
+            MethodQueue.callLater(handlePositionCheck, [ null ]);
             break;
         }
     }


Fixed attempting to place blocs vaporizing them if in incorrect positions

--- src/Displays/DBloc.as
+++ src/Displays/DBloc.as
@@ -94,7 +94,7 @@
 					FlxG.camera.shake(0.01 * U.zoom, 0.05);
 					new CustomAction(bloc.place, bloc.remove, U.pointToGrid(U.mouseLoc)).execute();
 					setSelect(true);
-				} else {
+				} else if (U.buttonManager.moused) {
 					bloc.destroy();
 					setSelect(false);
 				}


Adding some comments to satisfy code-review from D343.

Summary: Adding some comments to satisfy code-review from D343.

Test Plan: Changes are only comments for code-readability, no tests needed.

Reviewers: zac-playfab

Reviewed By: zac-playfab

Differential Revision: https://phab.playfabdev.com/D359

--- targets/actionscript/source/PlayFabApiTests.as
+++ targets/actionscript/source/PlayFabApiTests.as
@@ -196,7 +196,7 @@
             // Try to login, but if we fail, just fall-back and try to create character
             PlayFabClientAPI.LoginWithEmailAddress(loginRequest, Wrap(LoginWithAdvertisingId_LoginSuccess, "LoginWithAdvertisingId"), Wrap(Shared_ApiCallFailure, "LoginWithAdvertisingId"));
             function RecursiveWrap():void { CheckAdvertIdSuccess(-1); }
-            Wrap(RecursiveWrap, "RecursiveWrap_First")();
+            Wrap(RecursiveWrap, "RecursiveWrap_First")(); // ODD SYNTAX HERE: Wrap returns a function, which we then need to call.  Normally the wrap-return is passed in as a callback, which gets called by the sdk, or a utility.
         }
         private function LoginWithAdvertisingId_LoginSuccess(result:com.playfab.ClientModels.LoginResult) : void
         {
@@ -206,7 +206,7 @@
         private function CheckAdvertIdSuccess(count:Number) : void
         {
             TickTestHandler();
-            if (count > 20) // Base case, fail out
+            if (count > 20) // count is the number of attempts to test the successful send of the AdvertisingId.  It needs to be high enough to guarantee regular-case success, but low enough to fail within a reasonable time-limit
             {
                 ASyncAssert.Fail("AdvertisingId not sent properly: " + PlayFabSettings.AdvertisingIdType);
             }
@@ -218,7 +218,7 @@
             {
                 function RecursiveWrap():void { CheckAdvertIdSuccess(count + 1); }

-                var timer:Timer = new Timer(50, 1);
+                var timer:Timer = new Timer(50, 1); // timer takes a delay, which in this case re-tests the successful send of the AdvertisingId.  It needs to be high enough to guarantee regular-case success, but low enough to fail within a reasonable time-limit
                 timer.addEventListener(TimerEvent.TIMER, Wrap(RecursiveWrap, "RecursiveWrap_" + count));
                 timer.start();
             }


added Weave.privateLinkableChild()

added Weave.privateLinkableChild()

--- WeaveJS/src/Weave.as
+++ WeaveJS/src/Weave.as
@@ -407,6 +407,19 @@
 		}

 		/**
+		 * Shortcut for WeaveAPI.SessionManager.newLinkableChild() and WeaveAPI.SessionManager.registerLinkableChild() except the child will not be included in the session state.
+		 * @see weave.api.core.ISessionManager#newLinkableChild()
+		 * @see weave.api.core.ISessionManager#registerLinkableChild()
+		 */
+		public static function privateLinkableChild/*/<T extends ILinkableObject>/*/(linkableParent:Object, linkableChildOrType:/*/(new()=>T) | T/*/Object, callback:Function = null, useGroupedCallback:Boolean = false):/*/T/*/*
+		{
+			var child:* = linkableChild(linkableParent, linkableChildOrType, callback, useGroupedCallback);
+			// HACK until added to ISessionManager
+			WeaveAPI.SessionManager['excludeLinkableChildFromSessionState'](linkableParent, child);
+			return child;
+		}
+
+		/**
 		 * Shortcut for WeaveAPI.SessionManager.disposeObject()
 		 * @copy weave.api.core.ISessionManager#disposeObject()
 		 */


Change the visibility of the "addComponent" method in VertexFormat

--- src/aerys/minko/type/vertex/format/VertexFormat.as
+++ src/aerys/minko/type/vertex/format/VertexFormat.as
@@ -34,7 +34,7 @@
 				addComponent(component);
 		}

-		private function addComponent(component : VertexComponent) : void
+		public function addComponent(component : VertexComponent) : void
 		{
 			_components[component.implodedFields] = component;
 			_componentOffsets[component.implodedFields] = _dwordsPerVertex;
@@ -79,7 +79,7 @@
 			return _componentOffsets[component.implodedFields];
 		}

-		public function getOffsetForField(fieldName:String) : int
+		public function getOffsetForField(fieldName : String) : int
 		{
 			return _fieldOffsets[fieldName];
 		}


attribute “HIDE” defaults to 1

attribute “HIDE” defaults to 1

--- src/ss5player/data/SS5Attribute.as
+++ src/ss5player/data/SS5Attribute.as
@@ -27,7 +27,7 @@
 				case "CELL":
 					return null;
 				case "HIDE":
-					return 0;
+					return 1;
 				case "POSX":
 					return 0;
 				case "POSY":


Be can Inject ContextView as IVisualElementContainer

--- src/ssen/reflow/context/Context.as
+++ src/ssen/reflow/context/Context.as
@@ -4,6 +4,7 @@
 import flash.events.Event;

 import mx.core.IMXMLObject;
+import mx.core.IVisualElementContainer;
 import mx.managers.SystemManager;

 import ssen.reflow.IBackgroundProcessMap;
@@ -151,6 +152,9 @@
 		// 10. map dependencies
 		//----------------------------------------------------------------
 		// views
+		if (contextView is IVisualElementContainer) {
+			_injector.mapValue(IVisualElementContainer, contextView);
+		}
 		_injector.mapValue(contextView["constructor"], contextView);
 		_injector.mapValue(Stage, stage);


removed margin from menu

removed margin from menu

--- WeaveUI/src/weave/ui/controlBars/CustomMenuBar.as
+++ WeaveUI/src/weave/ui/controlBars/CustomMenuBar.as
@@ -19,6 +19,7 @@

 package weave.ui.controlBars
 {
+	import flash.display.DisplayObject;
 	import flash.geom.Point;
 	import flash.utils.setTimeout;

@@ -34,6 +35,8 @@

 	public class CustomMenuBar extends MenuBar
 	{
+		private static const MARGIN_WIDTH:int = 10; // same as in MenuBar.as
+
 		public function CustomMenuBar()
 		{
 			this.addEventListener(MenuEvent.MENU_SHOW, handleMenuShow);
@@ -54,6 +57,10 @@
 		{
 			super.updateDisplayList(unscaledWidth, unscaledHeight);

+			// remove hard-coded margins
+			for each (var item:DisplayObject in menuBarItems)
+				item.x -= MARGIN_WIDTH;
+
 			// fixes bug where old menu doesn't go away.
 			// We can't call Menu.hide() because it will still affect the MenuBar
 			// even though the MenuBar no longer manages the old Menu.
@@ -71,6 +78,14 @@
 				}
 			}
 			oldMenus = menus;
+		}
+
+		override protected function measure():void
+		{
+			super.measure();
+			// remove hard-coded margins
+			measuredWidth -= 2 * MARGIN_WIDTH;
+			measuredMinWidth -= 2 * MARGIN_WIDTH;
 		}

 		private var oldMenus:Array = null;


Adapted CensusDataSource to new hierarchyRefresh

--- WeaveData/src/weave/data/DataSources/CensusDataSource.as
+++ WeaveData/src/weave/data/DataSources/CensusDataSource.as
@@ -22,6 +22,7 @@

     import weave.compiler.StandardLib;
     import weave.compiler.Compiler;
+    import WeaveAPI;
     import weave.api.data.ColumnMetadata;
     import weave.api.data.DataType;
     import weave.api.data.IAttributeColumn;
@@ -40,6 +41,7 @@
     import weave.services.addAsyncResponder;
     import weave.utils.DataSourceUtils;
     import weave.utils.DebugUtils;
+    import weave.utils.VectorUtils;
     import weave.core.CallbackCollection;

     public class CensusDataSource extends AbstractDataSource implements IDataSource_Service
@@ -63,7 +65,7 @@

         private static const WEB_SERVICE:String = "__CensusDataSource__webService";

-        private static const META_ID_FIELDS:Array = [WEB_SERVICE, GEOGRAPHY_NAME, VARIABLE_NAME];
+        private static const META_ID_FIELDS:Array = [WEB_SERVICE, GEOGRAPHY_NAME, VARIABLE_NAME, GEOGRAPHY_REQUIRES];

         public function CensusDataSource()
         {
@@ -80,10 +82,10 @@
         }

 		private const jsonCache:JsonCache = newLinkableChild(this, JsonCache);
-		private const hierarchyRefresh:CallbackCollection = newLinkableChild(this, CallbackCollection);

 		public const keyTypeOverride:LinkableString = newLinkableChild(this, LinkableString);
 		public const apiKey:LinkableString = registerLinkableChild(this, new LinkableString(""));
+		private var nodeCache:Object = {};

 		/**
 		 * @param method Examples: "category", "category/series"
@@ -113,7 +115,7 @@
 			var data:Object = {id:0, name: name};
 			var children:Array = [];
 			return new ColumnTreeNode({
-				dependency: hierarchyRefresh,
+				dataSource: this,
 				data: data,
 				label: data.name,
 				isBranch: true,
@@ -140,7 +142,7 @@
 		public function createDataSetNode(data:Object):ColumnTreeNode
 		{
 			return new ColumnTreeNode({
-				dependency: hierarchyRefresh,
+				dataSource: this,
 				data: data,
 				label: data.label,
 				isBranch: true,
@@ -156,7 +158,7 @@
 								var metadata:Object = {};
 								metadata[VARIABLES_LINK] = data[VARIABLES_LINK];
 								metadata[WEB_SERVICE] = data[WEB_SERVICE];
-								metadata[GEOGRAPHY_REQUIRES] = geography.requires;
+								metadata[GEOGRAPHY_REQUIRES] = WeaveAPI.CSVParser.createCSVRow(geography.requires || []);
 								metadata[GEOGRAPHY_NAME] = geography.name;
 								metadata[GEOGRAPHY_LEVEL_ID] = geography.geoLevelId;
 								children.push(createGeographyNode(metadata));
@@ -174,7 +176,7 @@
 		public function createGeographyNode(data:Object):ColumnTreeNode
 		{
 			return new ColumnTreeNode({
-				dependency: hierarchyRefresh,
+				dataSource: this,
 				data: data,
 				label: data[GEOGRAPHY_NAME],
 				isBranch: true,
@@ -224,7 +226,7 @@
 		public function createConceptNode(data:Object):ColumnTreeNode
 		{
 			return new ColumnTreeNode({
-				dependency: hierarchyRefresh,
+				dataSource: this,
 				data: data,
 				label: data.name || "No Table",
 				isBranch: true,
@@ -235,7 +237,7 @@
 					{
 						children.push(createVariableNode(node.data.variables[key]));
 					}
-					StandardLib.sortOn(children, "label");
+					//StandardLib.sortOn(children, "label");
 					return children;
 				}
 			});
@@ -244,13 +246,13 @@

 		public function createVariableNode(data:Object):ColumnTreeNode
 		{
-			return new ColumnTreeNode({
+			return setIndexedNode(data, new ColumnTreeNode({
 				dataSource: this,
 				columnMetadata: data,
 				label: data.label,
 				isBranch: false,
 				hasChildBranches: false
-			});
+			}));
 		}

 		private function handleFault(event:FaultEvent, token:Object = null):void
@@ -264,10 +266,22 @@
                 _rootNode = createTopLevelNode();
             return _rootNode;
         }
+
+        private var _indexedNodes:Object = {};
+        private function setIndexedNode(metadata:Object, node:IWeaveTreeNode):ColumnTreeNode
+        {
+        	var key:String = Compiler.stringify(VectorUtils.getItems(metadata, META_ID_FIELDS));
+        	return _indexedNodes[key] = node;
+        }
+        private function getIndexedNode(metadata:Object):ColumnTreeNode
+        {
+        	var key:String = Compiler.stringify(VectorUtils.getItems(metadata, META_ID_FIELDS));
+        	return _indexedNodes[key];
+        }

 		override public function findHierarchyNode(metadata:Object):IWeaveTreeNode
 		{
-			return null;
+			return getIndexedNode(metadata);
 		}

 		override protected function generateHierarchyNode(metadata:Object):IWeaveTreeNode
@@ -289,15 +303,17 @@
         	var web_service:String = metadata[WEB_SERVICE];
         	var geography_name:String = metadata[GEOGRAPHY_NAME];
         	var variable_name:String = metadata[VARIABLE_NAME];
-        	var geography_requires:Array = metadata[GEOGRAPHY_REQUIRES];
+        	var key_column_names:Array = WeaveAPI.CSVParser.parseCSVRow(metadata[GEOGRAPHY_REQUIRES]);
+
+        	if (key_column_names)
+        		key_column_names.push(geography_name);
+        	else
+        		key_column_names = [geography_name];

         	var params:Object = {
         		get: variable_name,
         		"for": geography_name + ":*"
         	};
-
-        	var key_column_names:Array = geography_requires ? geography_requires.slice(0) : [];
-        	key_column_names.push(geography_name);

         	metadata[ColumnMetadata.KEY_TYPE] =  key_column_names.join(0);


May as well go totally ISO with date stamp, same as log4j %d

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

--- src/as/com/threerings/util/Log.as
+++ src/as/com/threerings/util/Log.as
@@ -279,8 +279,8 @@
         // return d.toLocaleTimeString();

         // format it like the date format in our java logs
-        return d.fullYear + "/" +
-            StringUtil.prepad(String(d.month + 1), 2, "0") + "/" +
+        return d.fullYear + "-" +
+            StringUtil.prepad(String(d.month + 1), 2, "0") + "-" +
             StringUtil.prepad(String(d.date), 2, "0") + " " +
             StringUtil.prepad(String(d.hours), 2, "0") + ":" +
             StringUtil.prepad(String(d.minutes), 2, "0") + ":" +


Fixed event tracker to send a value if optional label is not present

--- src/com/google/analytics/v4/Tracker.as
+++ src/com/google/analytics/v4/Tracker.as
@@ -1523,25 +1523,25 @@
                 success = _eventTracker.setKey( EVENT_TRACKER_PROJECT_ID,
                                                 EVENT_TRACKER_TYPE_KEY_NUM,
                                                 action );
-
-                if( label && label != "" )
+
+                if( label)
                 {
                     // event description / label
                     success = _eventTracker.setKey( EVENT_TRACKER_PROJECT_ID,
                                                     EVENT_TRACKER_LABEL_KEY_NUM,
                                                     label );
-                    params = 3;
-
-                    // aggregate value
-                    if( !isNaN(value) )
-                    {
-                        success = _eventTracker.setValue( EVENT_TRACKER_PROJECT_ID,
+                    params = 3;
+                }
+
+                 // aggregate value
+                 if( !isNaN(value) )
+                 {
+                     success = _eventTracker.setValue( EVENT_TRACKER_PROJECT_ID,
                                                           EVENT_TRACKER_VALUE_VALUE_NUM,
                                                           value );
-                        params = 4;
-                    }
-
-                }
+                     params = 4;
+                 }
+

                 // event tracker is set successfully
                 if( success )


Fix import

Fix import

--- src/common/mvc/model/base/BaseModel.as
+++ src/common/mvc/model/base/BaseModel.as
@@ -1,13 +1,13 @@
 package common.mvc.model.base
 {
-	import hu.vizoli.common.mvc.actor.BaseActor;
+    import common.mvc.actor.BaseActor;

 	/**
 	 * Base Model.
 	 *
 	 * @author vizoli
 	 */
-	public class BaseModel extends BaseActor
+	public class BaseModel extends BaseActor
 	{

 		public function BaseModel()


Transferred from the Adobe Open Source Subversion Repository

Revision: 12478
Author:   gosmith@adobe.com
Date:     2009-12-04T01:03:50.724937Z

Log Message:
-----------
The partAdded() and partRemoved() methods of Spark components now dispatch new events named "partAdded" and "partRemoved", of type SkinPartEvent. The accessibility implementation classes will soon use these events to know when skin parts are added and removed so that they can attach and remove event handlers appropriately. This mechanism may change in a future release, so developers should not depend on these undocumented events.

I've made sure that all overrides of partAdded() and partRemoved() call the supermethod so that they dispatch these events.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/SkinPartEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -856,7 +856,7 @@
         if (instance == verticalScrollBar)
             verticalScrollBar.viewport = viewport;

-        if (instance == horizontalScrollBar)
+        else if (instance == horizontalScrollBar)
             horizontalScrollBar.viewport = viewport;
     }

@@ -870,7 +870,7 @@
         if (instance == verticalScrollBar)
             verticalScrollBar.viewport = null;

-        if (instance == horizontalScrollBar)
+        else if (instance == horizontalScrollBar)
             horizontalScrollBar.viewport = null;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 17804
Author:   rfrishbe@adobe.com
Date:     2010-09-22T17:24:30.060779Z

Log Message:
-----------
Fixing a bunch of List issues:

- Scrolling now interacts with List's selection, even if it isn't the List's own scroller that is scrolling
- the touchInteractionEnd event is now bubbling as documented
- Remove a hack in Scroller aorund updateAfterEvent() because I figured out what the underlying bug is around scaleX/scaleY==0 affecting the thumb position for sliders and scrollbars
- Fixing some caret issues (though some still remain and need to be worked out)
- Fix a padding issue for MobileItemRenderer

QE notes: None
Doc notes: None
Bugs: SDK-27671, SDK-27675, SDK-27734, SDK-27828, SDK-27935
Reviewer: Hans
Tests run: checkintests, mustella Slider, Scrollbar, List
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -1840,18 +1840,6 @@
      */
     private var isScrolling:Boolean;

-    /**
-     *  @private
-     *  Used to keep track of the number of scrollDragEvents we've dispatched
-     *  we've determined we need to start scrolling.  This is because we want
-     *  to call updateAfterEvent() so our scroller is super-responsive, but
-     *  because of the way scrollbars work and when the thumb gets laid out,
-     *  we don't want to do this the first two times; otherwise, the scrollbar
-     *  thumb may be in a bad position. However, after the second time, the
-     *  thumb shoudl be positioned correctly.
-     */
-    private var scrollDraggingCountForUpdateAfterEvent:int = 0;
-
     //--------------------------------------------------------------------------
     //
     //  Methods
@@ -2091,9 +2079,6 @@
                         scrollGestureAnchorPoint = new Point(mouseDownedPoint.x, mouseDownedPoint.y - verticalSlop);
                 }

-                // see comment located above the variable for why this is needed
-                scrollDraggingCountForUpdateAfterEvent = 0;
-
                 // velocity calculations come from mouseDownedPoint.  The drag ones com from scrollStartPoint.
                 // This seems fine.
             }
@@ -2110,13 +2095,8 @@

             scroller.performDrag(dx, dy);

-            // Call updateAfterEvent() to make sure it looks smooth, but don't
-            // call it on the first or second time because the thumb might not be positioned
-            // correctly yet.
-            if (scrollDraggingCountForUpdateAfterEvent > 1)
-                event.updateAfterEvent();
-
-            scrollDraggingCountForUpdateAfterEvent++;
+            // Call updateAfterEvent() to make sure it looks smooth
+            event.updateAfterEvent();
         }
     }

@@ -2202,10 +2182,10 @@
             isScrolling = false;

             // don't do anything
-            scrollEndEvent = new TouchInteractionEvent(TouchInteractionEvent.TOUCH_INTERACTION_END);
+            scrollEndEvent = new TouchInteractionEvent(TouchInteractionEvent.TOUCH_INTERACTION_END, true);
             scrollEndEvent.relatedObject = scroller;
             scrollEndEvent.reason = TouchInteractionReason.SCROLL;
-            scroller.dispatchEvent(scrollEndEvent);
+            mouseDownedDisplayObject.dispatchEvent(scrollEndEvent);
             return;
         }

@@ -2227,10 +2207,10 @@
             isScrolling = false;

             // don't do anything
-            scrollEndEvent = new TouchInteractionEvent(TouchInteractionEvent.TOUCH_INTERACTION_END);
+            scrollEndEvent = new TouchInteractionEvent(TouchInteractionEvent.TOUCH_INTERACTION_END, true);
             scrollEndEvent.relatedObject = scroller;
             scrollEndEvent.reason = TouchInteractionReason.SCROLL;
-            scroller.dispatchEvent(scrollEndEvent);
+            mouseDownedDisplayObject.dispatchEvent(scrollEndEvent);
         }
     }

@@ -2290,10 +2270,10 @@
     {
         isScrolling = false;

-        var scrollEndEvent:TouchInteractionEvent = new TouchInteractionEvent(TouchInteractionEvent.TOUCH_INTERACTION_END);
+        var scrollEndEvent:TouchInteractionEvent = new TouchInteractionEvent(TouchInteractionEvent.TOUCH_INTERACTION_END, true);
         scrollEndEvent.relatedObject = scroller;
         scrollEndEvent.reason = TouchInteractionReason.SCROLL;
-        scroller.dispatchEvent(scrollEndEvent);
+        mouseDownedDisplayObject.dispatchEvent(scrollEndEvent);
     }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/framework/src/mx/collections/Sort.as
+++ frameworks/projects/framework/src/mx/collections/Sort.as
@@ -0,0 +1,877 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.collections
+{
+
+import flash.events.Event;
+import flash.events.EventDispatcher;
+import mx.collections.errors.SortError;
+import mx.core.mx_internal;
+import mx.managers.ISystemManager;
+import mx.managers.SystemManager;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+import mx.utils.ObjectUtil;
+
+use namespace mx_internal;
+
+[DefaultProperty("fields")]
+
+[ResourceBundle("collections")]
+
+/**
+ *  Provides the sorting information required to establish a sort on an
+ *  existing view (ICollectionView interface or class that implements the
+ *  interface). After you assign a Sort instance to the view's
+ *  sort property, you must call the view's
+ * refresh() method to apply the sort criteria.
+ *
+ *  Typically the sort is defined for collections of complex items, that is
+ *  collections in which the sort is performed on one or more properties of
+ *  the objects in the collection.
+ *  The following example shows this use:
+ *

+ *     var col:ICollectionView = new ArrayCollection();
+ *     // In the real world, the collection would have more than one item.
+ *     col.addItem({first:"Anders", last:"Dickerson"});
+ *     // Create the Sort instance.
+ *     var sort:Sort = new Sort();
+ *     // Set the sort field; sort on the last name first, first name second.
+ *     // Both fields are case-insensitive.
+ *     sort.fields = [new SortField("last",true), new SortField("first",true)];
+ *       // Assign the Sort object to the view.
+ *     col.sort = sort;
+ *     // Apply the sort to the collection.
+ *       col.refresh();
+ *

+ *
+ *
There are situations in which the collection contains simple items, like
+ *  String, Date, Boolean, etc.
+ *  In this case, apply the sort to the simple type directly.
+ *  When constructing a sort for simple items, use a single sort field,
+ *  and specify a null name (first) parameter
+ *  in the SortField object constructor.
+ *  For example:
+ *

+ *     var col:ICollectionView = new ArrayCollection();
+ *     col.addItem("California");
+ *     col.addItem("Arizona");
+ *     var sort:Sort = new Sort();
+ *     // There is only one sort field, so use a null first parameter.
+ *     sort.fields = [new SortField(null, true)];
+ *     col.sort = sort;
+ *       col.refresh();
+ *

+ *

+ *
+ *
The Flex implementations of the ICollectionView interface retrieve
+ *  all items from a remote location before executing a sort.
+ *  If you use paging with a sorted list, apply the sort to the remote
+ *  collection before you retrieve the data.
+ *

+ *
+ *  @mxml
+ *
+ *
The <mx:Sort> tag has the following attributes:

+ *
+ *

+ *  <mx:Sort
+ *  Properties
+ *  compareFunction="Internal compare function"
+ *  fields="null"
+ *  unique="false | true"
+ *  />
+ *

+ *
+ *  @see mx.collections.ICollectionView
+ *  @See SortField
+ */
+public class Sort extends EventDispatcher
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  When executing a find return the index any matching item.
+     */
+    public static const ANY_INDEX_MODE:String = "any";
+
+    /**
+     *  When executing a find return the index for the first matching item.
+     */
+    public static const FIRST_INDEX_MODE:String = "first";
+
+    /**
+     *  When executing a find return the index for the last matching item.
+     */
+    public static const LAST_INDEX_MODE:String = "last";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor.
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *
Creates a new Sort with no fields set and no custom comparator.

+     */
+    public function Sort()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Used for accessing localized Error messages.
+	 */
+	private var resourceManager:IResourceManager =
+									ResourceManager.getInstance();
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Storage for the compareFunction property.
+     */
+    private var _compareFunction:Function;
+
+    /**
+     *  @private
+     */
+    private var usingCustomCompareFunction:Boolean;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  The method used to compare items when sorting.
+     *  If you specify this property, Flex ignores any compareFunction
+     *  properties that you specify in the SortField objects that you
+     *  use in this class.
+     *
+     *
The compare function must have the following signature:

+     *
+     *

+     *
+     *     function [name](a:Object, b:Object, fields:Array = null):int
+     *
+     *

+     *
+     *
This function must return the following
+     *

+     *
-1, if a should appear before b in
+     *        the sorted sequence

+     *
0, if a equals b

+     *
1, if a should appear after b in the
+     *        sorted sequence

+     *

+     *
To return to the internal comparision function set this value to
+     *  null.

+     *

+     *  The fields array specified specifies the object fields
+     *  to compare.
+     *  Typically the algorithm will compare properties until the field list is
+     *  exhausted or a non zero value can be returned.
+     *  For example:

+     *
+     *

+     *    function myCompare(a:Object, b:Object, fields:Array = null):int
+     *    {
+     *        var result:int = 0;
+     *        var i:int = 0;
+     *        var propList:Array = fields ? fields : internalPropList;
+     *        var len:int = propList.length;
+     *        var propName:String;
+     *        while (result == 0 && (i < len))
+     *        {
+     *            propName = propList[i];
+     *            result = compareValues(a[propName], b[propName]);
+     *            i++;
+     *        }
+     *        return result;
+     *    }
+     *
+     *    function compareValues(a:Object, b:Object):int
+     *    {
+     *        if (a == null && b == null)
+     *            return 0;
+     *
+     *        if (a == null)
+     *          return 1;
+     *
+     *        if (b == null)
+     *           return -1;
+     *
+     *        if (a < b)
+     *            return -1;
+     *
+     *        if (a > b)
+     *            return 1;
+     *
+     *        return 0;
+     *    }
+     *

+     *
+     *
The default value is an internal compare function that can perform
+     *  a string, numeric, or date comparison in ascending or descending order,
+     *  with case-sensitive or case-insensitive string comparisons.
+     *  Specify your own function only if you need a need a custom comparison algorithm.
+     *  This is normally only the case if a calculated field is used in a display.

+     *
+     *
Alternatively you can specify separate compare functions for each sort
+     *  field by using the SortField class compare property;
+     *  This way you can use the default comparison for some fields and a custom
+     *  comparison for others.

+     */
+    public function get compareFunction():Function
+    {
+        return usingCustomCompareFunction ? _compareFunction : internalCompare;
+    }
+
+    /**
+     *  @private
+     */
+    public function set compareFunction(value:Function):void
+    {
+        _compareFunction = value;
+        usingCustomCompareFunction = _compareFunction != null;
+    }
+
+    //----------------------------------
+    //  fields
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the fields property.
+     */
+    private var _fields:Array;
+
+    /**
+     *  @private
+     */
+    private var fieldList:Array = [];
+
+    [Inspectable(category="General", arrayType="mx.collections.SortField")]
+    [Bindable("fieldsChanged")]
+
+    /**
+     *  An Array of SortField objects that specifies the fields to compare.
+     *  The order of the SortField objects in the array determines
+     *  field priority order when sorting.
+     *  The default sort comparator checks the sort fields in array
+     *  order until it determinines a sort order for the two
+     *  fields being compared.
+     *
+     *  @default null
+     *
+     *  @see SortField
+
+     */
+    public function get fields():Array
+    {
+        return _fields;
+    }
+
+    /**
+     *  @private
+     */
+    public function set fields(value:Array):void
+    {
+        _fields = value;
+        fieldList = [];
+        if (_fields)
+        {
+            var field:SortField;
+            for (var i:int = 0; i<_fields.length; i++)
+            {
+                field = SortField(_fields[i]);
+                fieldList.push(field.name);
+            }
+        }
+        dispatchEvent(new Event("fieldsChanged"));
+    }
+
+    //----------------------------------
+    //  unique
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the unique property.
+     */
+    private var _unique:Boolean;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Indicates if the sort should be unique.
+     *  Unique sorts fail if any value or combined value specified by the
+     *  fields listed in the fields property result in an indeterminate or
+     *  non-unique sort order; that is, if two or more items have identical
+     *  sort field values.
+     *
+     *  @default false
+     */
+    public function get unique():Boolean
+    {
+        return _unique;
+    }
+
+    /**
+     *  @private
+     */
+    public function set unique(value:Boolean):void
+    {
+        _unique = value;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+    *  Finds the specified object within the specified array (or the insertion
+    *  point if asked for), returning the index if found or -1 if not.
+    *  The ListCollectionView class findxxx() methods use
+    *  this method to find the requested item; as a general rule, it is
+    *  easier to use these functions, and not findItem() to find
+    *  data in ListCollectionView-based objects.
+    *  You call the findItem() method directly when writing a class
+    *  that supports sorting, such as a new ICollectionView implementation.
+    *
+    *  @param items the Array within which to search.
+    *  @param values Object containing the properties to look for (or
+    *                the object to search for, itself).
+    *                The object must consist of field name/value pairs, where
+    *                the field names are names of fields specified by the
+    *                SortFields property, in the same order they
+    *                are used in that property.
+    *                You do not have to specify all of the fields from the
+    *                SortFields property, but you
+    *                cannot skip any in the order.
+    *                Therefore, if the SortFields
+    *                properity lists three fields, you can specify its first
+    *                and second fields in this parameter, but you cannot specify
+    *                only the first and third fields.
+    *  @param mode String containing the type of find to perform.
+    *           Valid values are
+    *

+    *
ANY_INDEX_MODE
 Return any position that
+    *                   is valid for the values.
+    *
FIRST_INDEX_MODE
 Return the position
+    *                   where the first occurrance of the values is found.
+    *
LAST_INDEX_MODE
 Return the position
+    *                   where the
+    *                   last ocurrance of the specified values is found.
+    *

+    *  @param returnInsertionIndex If the method does not find an item identified
+    *                     by the values parameter, and this parameter
+    *                     is true the findItem()
+    *                     method returns the insertion point for the values,
+    *                     that is the point in the sorted order where you should
+    *                     insert the item.
+    *  @param compareFunction a comparator function to use to find the item.  If
+    *                 you do not specify this parameter, the function uses
+    *                 the function determined by the Sort instance's
+    *                 compareFunction property,
+    *                 passing in the array of fields determined
+    *                 by the values object and the current SortFields.
+    *  @return int The index in the array of the found item.
+    *                If the returnInsertionIndex parameter is
+    *              false and the item is not found, returns -1.
+    *                If the returnInsertionIndex parameter is
+    *              true and the item is not found, returns
+    *                the index of the point in the sorted array where the values
+    *              would be inserted.
+    */
+    public function findItem(items:Array,
+                             values:Object,
+                             mode:String,
+                             returnInsertionIndex:Boolean = false,
+                             compareFunction:Function = null):int
+    {
+        var compareForFind:Function;
+        var fieldsForCompare:Array;
+        var message:String;
+
+        if (!items)
+        {
+            message = resourceManager.getString(
+            	"collections", "noItems");
+            throw new SortError(message);
+        }
+        else if (items.length == 0)
+        {
+            return returnInsertionIndex ? 1 : -1;
+        }
+
+        if (compareFunction == null)
+        {
+            compareForFind = this.compareFunction;
+            // configure the search criteria
+            if (values && fieldList.length > 0)
+            {
+                fieldsForCompare = [];
+                //build up the fields we can compare, if we skip a field in the
+                //middle throw an error.  it is ok to not have all the fields
+                //though
+                var fieldName:String;
+                var hadPreviousFieldName:Boolean = true;
+                for (var i:int = 0; i < fieldList.length; i++)
+                {
+                    fieldName = fieldList[i];
+                    if (fieldName)
+                    {
+                        var hasFieldName:Boolean;
+                        try
+                        {
+                            hasFieldName = values[fieldName] !== undefined;
+                        }
+                        catch(e:Error)
+                        {
+                            hasFieldName = false;
+                        }
+                        if (hasFieldName)
+                        {
+                            if (!hadPreviousFieldName)
+                            {
+                            	message = resourceManager.getString(
+                            		"collections", "findCondition", [ fieldName ]);
+                                throw new SortError(message);
+                            }
+                            else
+                            {
+                                fieldsForCompare.push(fieldName);
+                            }
+                        }
+                        else
+                        {
+                            hadPreviousFieldName = false;
+                        }
+                    }
+                    else
+                    {
+                        //this is ok because sometimes a sortfield might
+                        //have a custom comparator
+                        fieldsForCompare.push(null);
+                    }
+                }
+                if (fieldsForCompare.length == 0)
+                {
+                	message = resourceManager.getString(
+                		"collections", "findRestriction");
+                    throw new SortError(message);
+                }
+                else
+                {
+                    try
+                    {
+                        initSortFields(items[0]);
+                    }
+                    catch(initSortError:SortError)
+                    {
+                        //oh well, use the default comparators...
+                    }
+                }
+            }
+        }
+        else
+        {
+            compareForFind = compareFunction;
+        }
+
+        // let's begin searching
+        var found:Boolean = false;
+        var objFound:Boolean = false;
+        var index:int = 0;
+        var lowerBound:int = 0;
+        var upperBound:int = items.length -1;
+        var obj:Object = null;
+        var direction:int = 1;
+        while(!objFound && (lowerBound <= upperBound))
+        {
+            index = Math.round((lowerBound+ upperBound)/2);
+            obj = items[index];
+            //if we were given fields for comparison use that method, but
+            //if not the comparator may be for SortField in which case
+            //it'd be an error to pass a 3rd parameter
+            direction = fieldsForCompare
+                ? compareForFind(values, obj, fieldsForCompare)
+                : compareForFind(values, obj);
+
+            switch(direction)
+            {
+                case -1:
+                    upperBound = index -1;
+                break;
+
+                case 0:
+                    objFound = true;
+                    switch(mode)
+                    {
+                        case ANY_INDEX_MODE:
+                            found = true;
+                        break;
+
+                        case FIRST_INDEX_MODE:
+                            found = (index == lowerBound);
+                            // start looking towards bof
+                            var objIndex:int = index - 1;
+                            var match:Boolean = true;
+                            while(match && !found && (objIndex >= lowerBound))
+                            {
+                                obj = items[objIndex];
+                                var prevCompare:int = fieldsForCompare
+                                    ? compareForFind(values, obj, fieldsForCompare)
+                                    : compareForFind(values, obj);
+                                match = (prevCompare == 0);
+                                if (!match || (match && (objIndex == lowerBound)))
+                                {
+                                    found= true;
+                                    index = objIndex + (match ? 0 : 1);
+                                } // if match
+                                objIndex--;
+                            } // while
+                        break;
+
+                        case LAST_INDEX_MODE:
+                            // if we where already at the edge case then we already found the last value
+                            found = (index == upperBound);
+                            // start looking towards eof
+                            objIndex = index + 1;
+                            match = true;
+                            while(match && !found && (objIndex <= upperBound))
+                            {
+                                obj = items[objIndex];
+                                var nextCompare:int = fieldsForCompare
+                                    ? compareForFind(values, obj, fieldsForCompare)
+                                    : compareForFind(values, obj);
+                                match = (nextCompare == 0);
+                                if (!match || (match && (objIndex == upperBound)))
+                                {
+                                    found= true;
+                                    index = objIndex - (match ? 0 : 1);
+                                } // if match
+                                objIndex++;
+                            } // while
+                        break;
+                        default:
+                        {
+                        	message = resourceManager.getString(
+                        		"collections", "unknownMode");
+                            throw new SortError(message);
+                        }
+                    } // switch
+                break;
+
+                case 1:
+                    lowerBound = index +1;
+                break;
+            } // switch
+        } // while
+        if (!found && !returnInsertionIndex)
+        {
+            return -1;
+        }
+        else
+        {
+            return (direction > 0) ? index + 1 : index;
+        }
+    }
+
+    /**
+     *  Return whether the specified property is used to control the sort.
+     *  The function cannot determine a definitive answer if the sort uses a
+     *  custom comparitor; it always returns true in this case.
+     *
+     *  @param property The name of the field that to test.
+     *  @return Whether the property value might affect the sort outcome.
+     *  If the sort uses the default compareFunction, returns
+     *  true if the
+     *  property parameter specifies a sort field.
+     *  If the sort or any SortField uses a custom comparator,
+     * there's no way to know, so return true.
+     */
+    public function propertyAffectsSort(property:String):Boolean
+    {
+        if (usingCustomCompareFunction || !fields) return true;
+        for (var i:int = 0; i < fields.length; i++)
+        {
+            var field:SortField = fields[i];
+            if (field.name == property || field.usingCustomCompareFunction)
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Goes through all SortFields and calls reverse() on them.
+     * If the field was descending now it is ascending, and vice versa.
+     *
+     *
Note: an ICollectionView does not automatically update when the
+     * SortFields are modified; call its refresh() method to
+     * update the view.

+     */
+    public function reverse():void
+    {
+        if (fields)
+        {
+            for (var i:int = 0; i < fields.length; i++)
+            {
+                SortField(fields[i]).reverse();
+            }
+        }
+        noFieldsDescending = !noFieldsDescending;
+    }
+
+    /**
+     *  Apply the current sort to the specified array (not a copy).
+     *  To prevent the array from being modified, create a copy
+     *  use the copy in the items parameter.
+     *
+     *
Flex ICollectionView implementations call the sort method
+     *  automatically and ensure that the sort is performed on a copy of the
+     *  underlying data.

+     *
+     *  @param items Array of items to sort.
+     */
+    public function sort(items:Array):void
+    {
+        if (!items || items.length <= 1)
+        {
+            return;
+        }
+
+        if (usingCustomCompareFunction)
+        {
+        	// bug 185872
+        	// the Sort.internalCompare function knows to use Sort._fields; that same logic
+        	// needs to be part of calling a custom compareFunction. Of course, a user shouldn't
+        	// be doing this -- so I wrap calls to compareFunction with _fields as the last parameter
+        	const fixedCompareFunction:Function =
+        		function (a:Object, b:Object):int
+                {
+		        	// append our fields to the call, since items.sort() won't
+                	return compareFunction(a, b, _fields);
+            	};
+
+            var message:String;
+
+            if (unique)
+            {
+                var uniqueRet1:Object = items.sort(fixedCompareFunction, Array.UNIQUESORT);
+                if (uniqueRet1 == 0)
+                {
+                    message = resourceManager.getString(
+                    	"collections", "nonUnique");
+                    throw new SortError(message);
+                }
+            }
+            else
+            {
+                items.sort(fixedCompareFunction);
+            }
+        }
+        else
+        {
+            var fields:Array = this.fields;
+            if (fields && fields.length > 0)
+            {
+                var i:int;
+                //doing the init value each time may be a little inefficient
+                //but allows for the data to change and the comparators
+                //to update correctly
+                //the sortArgs is an object that if non-null means
+                //we can use Array.sortOn which will be much faster
+                //than going through internalCompare.  However
+                //if the Sort is supposed to be unique and fields.length > 1
+                //we cannot use sortOn since it only tests uniqueness
+                //on the first field
+                var sortArgs:Object = initSortFields(items[0], true);
+
+                if (unique)
+                {
+                    var uniqueRet2:Object;
+                    if (sortArgs && fields.length == 1)
+                    {
+                        uniqueRet2 = items.sortOn(sortArgs.fields[0], sortArgs.options[0] | Array.UNIQUESORT);
+                    }
+                    else
+                    {
+                        uniqueRet2 = items.sort(internalCompare,
+                                                Array.UNIQUESORT);
+                    }
+                    if (uniqueRet2 == 0)
+                    {
+	                    message = resourceManager.getString(
+	                    	"collections", "nonUnique");
+                        throw new SortError(message);
+                    }
+                }
+                else
+                {
+                    if (sortArgs)
+                    {
+                        items.sortOn(sortArgs.fields, sortArgs.options);
+                    }
+                    else
+                    {
+                        items.sort(internalCompare);
+                    }
+                }
+            }
+            else
+            {
+                items.sort(internalCompare);
+            }
+        }
+    }
+
+    /**
+     *  @private
+     *  A pretty printer for Sort that lists the sort fields and their
+     *  options.
+     */
+    override public function toString():String
+    {
+        return ObjectUtil.toString(this);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Helper
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Make sure all SortFields are ready to execute their comparators.
+     */
+    private function initSortFields(item:Object, buildArraySortArgs:Boolean = false):Object
+    {
+        var arraySortArgs:Object = null;
+        var i:int;
+        for (i = 0; i<fields.length; i++)
+        {
+            SortField(fields[i]).initCompare(item);
+        }
+        if (buildArraySortArgs)
+        {
+            arraySortArgs = {fields: [], options: []};
+            for (i = 0; i<fields.length; i++)
+            {
+                var field:SortField = fields[i];
+                var options:int = field.getArraySortOnOptions();
+                if (options == -1)
+                {
+                    return null;
+                }
+                else
+                {
+                    arraySortArgs.fields.push(field.name);
+                    arraySortArgs.options.push(options);
+                }
+            }
+
+        }
+        return arraySortArgs;
+    }
+
+    /**
+     *  @private
+     *  Compares the values specified based on the sort field options specified
+     *  for this sort.  The fields parameter is really just used to get the
+     *  number of fields to check.  We don't look at the actual values
+     *  to see if they match the actual sort.
+     */
+    private function internalCompare(a:Object, b:Object, fields:Array = null):int
+    {
+        var result:int = 0;
+        if (!_fields)
+        {
+            result = noFieldsCompare(a, b);
+        }
+        else
+        {
+            var i:int = 0;
+            var len:int = fields ? fields.length : _fields.length;
+            while (result == 0 && (i < len))
+            {
+                var sf:SortField = SortField(_fields[i]);
+                result = sf.internalCompare(a, b);
+                i++;
+            }
+        }
+
+        return result;
+    }
+
+    private var defaultEmptyField:SortField;
+    private var noFieldsDescending:Boolean = false;
+
+    /**
+     * If the sort does not have any sort fields nor a custom comparator
+     * just use an empty SortField object and have it use its default
+     * logic.
+     */
+    private function noFieldsCompare(a:Object, b:Object, fields:Array = null):int
+    {
+        if (!defaultEmptyField)
+        {
+            defaultEmptyField = new SortField();
+            try
+            {
+                defaultEmptyField.initCompare(a);
+            }
+            catch(e:SortError)
+            {
+                //this error message isn't as useful in this case so replace
+				var message:String = resourceManager.getString(
+					"collections", "noComparator", [ a ]);
+                throw new SortError(message);
+            }
+        }
+
+        var result:int = defaultEmptyField.compareFunction(a, b);
+
+        if (noFieldsDescending)
+        {
+            result *= -1;
+        }
+
+        return result;
+    }
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18639
Author:   egeorgie@adobe.com
Date:     2010-11-17T01:20:40.860178Z

Log Message:
-----------
SkinnablePopUpContainer P-ARB changes

- Rename PopUpCloseEvent -> PopUpEvent
- Remove "disabledAndClosed", "disabledAndClosedAndLandscape" states
- Renamed SkinnablePopUpContainer's property from opened -> isOpen

Additionally:
- turn off modalTransparency and modalBlur in the mobileTheme

QE notes: SkinnablePopUpContainer is now code complete
Doc notes:
Bugs:
Reviewer: Jason & Jason
Tests run: manual, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/PopUpCloseEvent.as" copyfrom-rev="18594" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/PopUpEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/events/PopUpCloseEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/events/FlexEvent.as
+++ frameworks/projects/framework/src/mx/events/FlexEvent.as
@@ -1412,43 +1412,41 @@
      *  @productversion Flex 3
      */
     public static const VALUE_COMMIT:String = "valueCommit";
-
-    /**
-     *  The FlexEvent.OPEN constant defines the value of the
-     *  type property of the event object for an open
-     *  event.  This event is dispatched after a SkinnablePopUpContainer has been
-     *  added to the PopUpManager and the transition to its "normal" state has completed.
-     *
-     *
The properties of the event object have the following values:

+
+    /**
+     *  The FlexEvent.STATE_CHANGE_COMPLETE constant defines the value of the
+     *  type property of the event object for a stateChangeComplete event.
+     *
+     *
This event will only be dispatched when there are one or more relevant listeners
+     * attached to the dispatching object.

      *
-     *

-     *
Property	Value

-     *
bubbles	false

-     *
cancelable	false

-     *
returnValue	null

-     *
currentTarget	The Object that defines the
-     *       event listener that handles the event. For example, if you use
-     *       myButton.addEventListener() to register an event listener,
-     *       myButton is the value of the currentTarget.

-     *
target	The Object that dispatched the event;
-     *       it is not always the Object listening for the event.
-     *       Use the currentTarget property to always access the
-     *       Object listening for the event.

-     *
Type	FlexEvent.OPEN

-     *

-     *
-     *  @eventType open
-     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *

+     *
+     *  @eventType stateChangeComplete
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public static const OPEN:String = "open";
-
-    /**
-     *  The FlexEvent.STATE_TRANSITION_COMPLETE constant defines the value of the
-     *  type property of the event object for a stateTransitionComplete event.
+    public static const STATE_CHANGE_COMPLETE:String = "stateChangeComplete";
+
+    /**
+     *  The FlexEvent.STATE_CHANGE_INTERRUPTED constant defines the value of the
+     *  type property of the event object for a stateChangeInterrupted event.
      *
      *
This event will only be dispatched when there are one or more relevant listeners
      * attached to the dispatching object.

@@ -1468,45 +1466,14 @@
      *       Object listening for the event.

      *

      *
-     *  @eventType stateTransitionComplete
+     *  @eventType stateChangeInterrupted
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public static const STATE_TRANSITION_COMPLETE:String = "stateTransitionComplete";
-
-    /**
-     *  The FlexEvent.STATE_TRANSITION_INTERRUPTED constant defines the value of the
-     *  type property of the event object for a stateTransitionInterrupted event.
-     *
-     *
This event will only be dispatched when there are one or more relevant listeners
-     * attached to the dispatching object.

-     *
-     *
The properties of the event object have the following values:

-     *

-     *
Property	Value

-     *
bubbles	false

-     *
cancelable	false

-     *
currentTarget	The Object that defines the
-     *       event listener that handles the event. For example, if you use
-     *       myButton.addEventListener() to register an event listener,
-     *       myButton is the value of the currentTarget.

-     *
target	The Object that dispatched the event;
-     *       it is not always the Object listening for the event.
-     *       Use the currentTarget property to always access the
-     *       Object listening for the event.

-     *

-     *
-     *  @eventType stateTransitionInterrupted
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public static const STATE_TRANSITION_INTERRUPTED:String = "stateTransitionInterrupted";
+    public static const STATE_CHANGE_INTERRUPTED:String = "stateChangeInterrupted";

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4370
Author:   egeorgie@adobe.com
Date:     2008-12-20T00:54:57.521642Z

Log Message:
-----------
Fix a merge conflict: revision 4357 accidentally reverted my revision 4311
QE Notes: None
Doc Notes: None
Bugs: regress bug http://bugs.adobe.com/jira/browse/SDK-18433
Reviewer: me
tests: None

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as

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

--- frameworks/projects/framework/src/mx/utils/MatrixUtil.as
+++ frameworks/projects/framework/src/mx/utils/MatrixUtil.as
@@ -365,6 +365,10 @@
                                                          maxX:Number,
                                                          maxY:Number):Point
     {
+        // Make sure preferredX, preferredY are between minX and maxX
+        preferredX = Math.max(minX, Math.min(maxX, preferredX));
+        preferredY = Math.max(minY, Math.min(maxY, preferredY));
+
         // Untransformed bounds size is (x,y). The corners of the untransformed
         // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
         // Matrix is | a c tx |
@@ -519,6 +523,10 @@
                                                         maxX:Number,
                                                         maxY:Number):Point
     {
+        // Make sure preferredX, preferredY are between minX and maxX
+        preferredX = Math.max(minX, Math.min(maxX, preferredX));
+        preferredY = Math.max(minY, Math.min(maxY, preferredY));
+
         // Untransformed bounds size is (x,y). The corners of the untransformed
         // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
         // Matrix is | a c tx |


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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  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.
+//  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: 3724
Author:   gruehle@adobe.com
Date:     2008-10-17T21:42:20.548422Z

Log Message:
-----------
Text style changes:

* Default text styles for Gumbo components are temporarily placed on type selectors (as of revision 3528). This checkin changes those selectors to just two: TextGraphicElement and TextView. This makes the default font work correctly for all 5 text-related tags - TextBox, TextGraphic, TextView, FxTextArea, and FxTextInput.

* Since the default text styles are temporarily on type selectors, setting text styles on component tags was not working. This checkin fixes that by explicitly setting the "styleName" property of the labelField (Button) and textView (FxTextBase) skin parts to the component itself. This way, any styles set on the component will take precedence over styles set on the text type selectors.

QE Notes: Text styles can be set on component tags (ie <FxButton fontSize="24" />). This should be tested.
Doc Notes: We should add a release note about changing the default text styles for Gumbo components. This is done on the TextGraphicElement and TextView type selectors.
Bugs: SDK-17159
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.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/wireframe/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>

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

--- frameworks/projects/spark/src/spark/components/Button.as
+++ frameworks/projects/spark/src/spark/components/Button.as
@@ -342,6 +342,12 @@
         if (instance == labelField)
         {
             labelField.text = label;
+
+            // TODO: Remove this hard-coded styleName assignment
+            // once all global text styles are moved to the global
+            // stylesheet. This is a temporary workaround to support
+            // inline text styles for Buttons and subclasses.
+            labelField.styleName = this;
         }
     }


comitted patricks fastmath atan2 contribution

--- apparat-ersatz/src/main/as3/apparat/math/FastMath.as
+++ apparat-ersatz/src/main/as3/apparat/math/FastMath.as
@@ -83,23 +83,24 @@
 		 *
 		 * @author Eugene Zatepyakin
 		 * @author Joa Ebert
+		 * @author Patrick Le Clec'h
+		 *
 		 * @param y A number specifying the y coordinate of the point.
 		 * @param x A number specifying the x coordinate of the point.
+		 *
 		 * @return A number.
 		 */
 		public static function atan2(y:Number, x:Number):Number {
-			var angle: Number
-			var r: Number
-			var sign: Number = 1.0 - (int(y < 0.0) << 1)
-			var absY: Number = y * sign + 2.220446049250313e-16
-
-			if(x >= 0.0) {
-				r = (x - absY) / (x + absY)
-				angle = 0.785398164
-			} else {
-				r = (x + absY) / (absY - x)
-				angle = 2.356194491
-			}
+			var angle:Number
+			var r:Number
+			var sign:Number = 1.0 - (int(y < 0.0) << 1)
+			var absY:Number = y * sign + 2.220446049250313e-16
+
+			var partSignX:Number = (int(x < 0.0) << 1) // [0.0/2.0]
+			var signX:Number = 1.0 - partSignX // [1.0/-1.0]
+
+			r = (x - signX * absY) / (signX * x + absY)
+			angle = (partSignX + 1.0) * 0.7853981634

 			angle += (0.1821 * r * r - 0.9675) * r


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 13090
Author:   egeorgie@adobe.com
Date:     2009-12-18T00:56:07.141669Z

Log Message:
-----------
Fix http://bugs.adobe.com/jira/browse/SDK-24683 text labels exceeding ButtonBarButton bounds when resizing the Spark ButtonBar control

Problem: The baselinePosition getter calls internal method validateBaselinePosition(), which in turns resizes the component to its explicit or measured actual size if width or height is zero. This is incorrectly functioning, since the size of the component is not restored afterwards.

Fix: Do this auto-changing of the actualSize only if layout has not resized the component yet.

QE notes: None
Doc notes: None
Bugs: SDK-24683
Reviewer: Glenn, Corey
Tests run: checkintests, mustella tests/gumbo/components
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -1839,6 +1839,16 @@
      *  updateDisplayList() method called.
      */
     mx_internal var invalidateDisplayListFlag:Boolean = false;
+
+    /**
+     *  @private
+     *  Whether setActualSize() has been called on this component
+     *  at least once.  This is used in validateBaselinePosition()
+     *  to resize the component to explicit or measured
+     *  size if baselinePosition getter is called before the
+     *  component has been resized by the layout.
+     */
+    mx_internal var setActualSizeCalled:Boolean = false;

     //--------------------------------------------------------------------------
     //
@@ -7645,7 +7655,10 @@

         // If this component hasn't been sized yet, assign it
         // an actual size that's based on its explicit or measured size.
-        if (width == 0 || height == 0)
+        //
+        // TODO (egeorgie): remove this code when all SDK clients
+        // follow the rule to size first and query baselinePosition later.
+        if (!setActualSizeCalled && (width == 0 || height == 0))
         {
             validateNow();

@@ -9162,6 +9175,8 @@
             invalidateDisplayList();
             dispatchResizeEvent();
         }
+
+        setActualSizeCalled = true;
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4790
Author:   jimurphy@adobe.com
Date:     2009-02-02T18:13:13.580538Z

Log Message:
-----------
Merged 3.x revisions 4710-4711,4741,4746-4747,4755,4777,4787 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/NumberBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloFocusRect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<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/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</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/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.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/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -7487,7 +7487,12 @@
             hasFocusRect = false;

             if (focusObj)
+            {
                 focusObj.visible = false;
+
+                if (focusObj is ISimpleStyleClient)
+                  ISimpleStyleClient(focusObj).styleName = null;
+            }

             removeEventListener(MoveEvent.MOVE, focusObj_moveHandler);
             removeEventListener(MoveEvent.MOVE, focusObj_moveHandler, true);


Transferred from the Adobe Open Source Subversion Repository

Revision: 3106
Author:   gosmith@adobe.com
Date:     2008-09-04T22:22:57.010967Z

Log Message:
-----------
Gumbo TextInput once again supports an 'enter' event, fixing a regression introduced yesterday.

Reviewer: Jono
Bugs: -
QA: No
Doc: NO

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>

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

--- frameworks/projects/framework/src/mx/events/FlexEvent.as
+++ frameworks/projects/framework/src/mx/events/FlexEvent.as
@@ -571,6 +571,29 @@
     public static const REPEAT_START:String = "repeatStart";

     /**
+     *  The FlexEvent.SELECTION_CHANGE constant defines the value of the
+     *  type property of the event object for a selectionChange event.
+     *
+     *
The properties of the event object have the following values:

+     *

+     *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

+     *
currentTarget	The Object that defines the
+     *       event listener that handles the event. For example, if you use
+     *       myButton.addEventListener() to register an event listener,
+     *       myButton is the value of the currentTarget.

+     *
target	The Object that dispatched the event;
+     *       it is not always the Object listening for the event.
+     *       Use the currentTarget property to always access the
+     *       Object listening for the event.

+     *

+     *
+     *  @eventType deferredContentCreate
+     */
+    public static const SELECTION_CHANGE:String = "selectionChange";
+
+    /**
      *  The FlexEvent.SHOW constant defines the value of the
      *  type property of the event object for a show event.
      *


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

--- frameworks/projects/framework/src/mx/utils/LinkedList.as
+++ frameworks/projects/framework/src/mx/utils/LinkedList.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 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
 {


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

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

 package mx.containers
 {