Transferred from the Adobe Open Source Subversion Repository

Revision: 19722
Author:   egeorgie@adobe.com
Date:     2011-01-12T00:53:24.336848Z

Log Message:
-----------
Fix popups/tooltips and scaling bugs:
Slider tooltip renders far above under 2.0 scaling - http://bugs.adobe.com/jira/browse/SDK-28833
Mobile HSliderSkin dataTip sometimes stops following the thumb all the way to the right edge - http://bugs.adobe.com/jira/browse/SDK-28762
When the app is scaled, DropDownList shows the list at wrong place - http://bugs.adobe.com/jira/browse/SDK-28818

In this change:
- update popup/tooltip positioning code to work with scaling.

QE notes:  make another test pass on tooltips/pop-ups
Doc notes:
Bugs: SDK-28833, SDK-28762, SDK-28818
Reviewer: Alex
Tests run: full mustella cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/PopUpUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>

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

--- frameworks/projects/framework/src/mx/utils/PopUpUtil.as
+++ frameworks/projects/framework/src/mx/utils/PopUpUtil.as
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+import flash.display.DisplayObject;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import mx.core.IFlexDisplayObject;
+import mx.core.UIComponent;
+import mx.managers.ISystemManager;
+
+[ExcludeClass]
+
+/**
+ *  Helper functionality for working with pop-ups.
+ */
+public class PopUpUtil
+{
+
+    /**
+     *  Calculates the position for a pop-up in sanboxRoot coordinates (the pop-up coordinate space).
+     *
+     *  @param component       The component that defines the component coordinate space.
+     *
+     *  @param systemManager   The systemManager that defines the SandboxRoot.  Typically component.systemManager.
+     *
+     *  @param popUpWidth      The width of the popup, in SandboxRoot coordinates (i.e. popUp.width).
+     *
+     *  @param popUpHeight     The height of the popup, in SandboxRoot coordinates (i.e. popUp.height).
+     *
+     *  @param verticalCenter  The desired distance from the center of the popUp to the top edge of the
+     *                         component.  In component coordinates. For example, to center relative to the
+     *                         component, pass component.heihgt / 2.  To disable centering, pass NaN.
+     *
+     *  @param popUpPosition   The position of the pop-up, specified in SandboxRoot coordinates (i.e. pupUp.x, popUp.y)
+     *
+     *  @param regPoint        The position of the popUp, specified in the component's coordinate space.  This is ignored if
+     *                         popUpPosition is specified.
+     *
+     *  @param ensureOnScreen  When true, will check against the visible screen of the application and adjust the position
+     *                         if necessary.
+     *
+     *  @return  The position of the pop-up in SandboxRoot coordinates.
+     */
+    public static function positionOverComponent(component:DisplayObject,
+                                                 systemManager:ISystemManager, // The component's systemManager
+                                                 popUpWidth:Number,            // in sandboxRoot coordinates
+                                                 popUpHeight:Number,           // in sandboxRoot coordinates
+                                                 verticalCenter:Number = NaN,  // in component coordinates, if NaN, it's ignored
+                                                 popUpPosition:Point = null,   // in sandboxRoot coordinates, if specified, regPoint is ignored
+                                                 regPoint:Point = null,        // in component coordinates, if not specified defaults to (0,0)
+                                                 ensureOnScreen:Boolean = true):Point
+    {
+        // Original code:
+        //        var toolTip:IToolTip = event.toolTip;
+        //
+        //        // Calculate global position of label.
+        //        var sm:ISystemManager = systemManager.topLevelSystemManager;
+        //        var sbRoot:DisplayObject = sm.getSandboxRoot();
+        //        var screen:Rectangle = sm.getVisibleApplicationRect(null, true);;
+        //        var pt:Point = new Point(0, 0);
+        //        pt = label.localToGlobal(pt);
+        //        pt = sbRoot.globalToLocal(pt);
+        //
+        //        toolTip.move(pt.x, pt.y + (height - toolTip.height) / 2);
+        //
+        //        var screenRight:Number = screen.x + screen.width;
+        //        pt.x = toolTip.x;
+        //        pt.y = toolTip.y;
+        //        pt = sbRoot.localToGlobal(pt);
+        //        if (pt.x + toolTip.width > screenRight)
+        //            toolTip.move(toolTip.x - (pt.x + toolTip.width - screenRight), toolTip.y);
+
+        // Refactored for correctness when there's scale in play:
+
+        //        var sm:ISystemManager = systemManager.topLevelSystemManager;
+        //        var sbRoot:DisplayObject = sm.getSandboxRoot();
+        //
+        //        // Calculate sbRoot position of label.
+        //        var pt:Point = new Point(0, 0);
+        //        pt = sbRoot.globalToLocal(localToGlobal(pt)); // point in sbRoot coordinates
+        //
+        //        // Screen in sbRoot cooridnates
+        //        var screen:Rectangle = sm.getVisibleApplicationRect(null, true);
+        //        var screenRight:Number = sbRoot.globalToLocal(screen.bottomRight).x;
+        //
+        //        // Height in sbRoot coordinates
+        //        var h:Number = sbRoot.globalToLocal(localToGlobal(new Point(0, height))).y;
+        //
+        //        // Center vertically, make sure tooltip doesn't overlap right edge of the screen
+        //        var x:Number = Math.min(pt.x, screenRight - toolTip.width);
+        //        var y:Number = pt.y + (h - toolTip.height) / 2;
+        //        toolTip.move(x, y);
+
+        // Would translate to:
+
+        //        var toolTip:IToolTip = event.toolTip;
+        //        var pt:Point = PopUpUtil.positionOverComponent(DisplayObject(label),
+        //                                                       systemManager,
+        //                                                       toolTip.width,
+        //                                                       toolTip.height,
+        //                                                       height / 2);
+        //        toolTip.move(pt.x, pt.y);
+
+
+        var sm:ISystemManager = systemManager.topLevelSystemManager;
+        var sbRoot:DisplayObject = sm.getSandboxRoot();
+
+        // Find the position of the popup in sandboxRoot coordinates
+        var x:Number = 0;
+        var y:Number = 0;
+
+        if (popUpPosition)
+        {
+            // Already in sandboxRoot coordinates
+            x = popUpPosition.x;
+            y = popUpPosition.y;
+        }
+        else
+        {
+            // If not specified, regPoint defaults to component's (0,0).
+            if (!regPoint)
+                regPoint = new Point(0, 0);
+
+            // Convert to sandboxRoot coordinates
+            var position:Point = sbRoot.globalToLocal(component.localToGlobal(regPoint));
+            x = position.x;
+            y = position.y;
+        }
+
+        // Do we need to center vertically?
+        if (!isNaN(verticalCenter))
+        {
+            // verticalCenter is in component coordinates, convert to sandboxRoot
+            var vc:Number = sbRoot.globalToLocal(component.localToGlobal(new Point(0, verticalCenter))).y;
+            y = vc - popUpHeight / 2;
+        }
+
+        if (ensureOnScreen)
+        {
+            // Convert screen to sandboxRoot cooridnates
+            var screen:Rectangle  = sm.getVisibleApplicationRect(null, true);
+            var topLeft:Point     = sbRoot.globalToLocal(screen.topLeft);
+            var bottomRight:Point = sbRoot.globalToLocal(screen.bottomRight);
+
+            // clamp position, don't round
+            x = Math.max(topLeft.x, Math.min(bottomRight.x - popUpWidth, x));
+            y = Math.max(topLeft.y, Math.min(bottomRight.y - popUpHeight, y));
+        }
+
+        return new Point(x, y);
+    }
+}
+}
+


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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/DateChooserAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/DateChooserAutomationImpl.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


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

--- frameworks/projects/automation_spark/src/spark/automation/events/SparkDataGridItemSelectEvent.as
+++ frameworks/projects/automation_spark/src/spark/automation/events/SparkDataGridItemSelectEvent.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.automation.events
 {


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

--- frameworks/projects/charts/src/mx/core/Version.as
+++ frameworks/projects/charts/src/mx/core/Version.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.
+//
+////////////////////////////////////////////////////////////////////////////////

 import mx.core.mx_internal;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19401
Author:   mhorn@adobe.com
Date:     2010-12-15T20:50:38.178104Z

Log Message:
-----------
Temporary ASDoc updates for bug fix SDK-28907

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Button.as</path>

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

--- frameworks/projects/mx/src/mx/controls/LinkBar.as
+++ frameworks/projects/mx/src/mx/controls/LinkBar.as
@@ -121,7 +121,7 @@
 /**
  *  Seperator symbol between LinkButton controls in the LinkBar.
  *
- *  @default mx.skins.halo.LinkSeparator
+ *  @default mx.skins.halo.LinkSeparator (for both Halo and Spark themes)
  *
  *  @langversion 3.0
  *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 3510
Author:   jimurphy@adobe.com
Date:     2008-10-07T18:36:20.168841Z

Log Message:
-----------
some stragglers...

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxContainerBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/CallAction.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -0,0 +1,395 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.components.baseClasses
+{
+
+import flash.events.Event;
+import flash.events.FocusEvent;
+
+import mx.components.TextView;
+import mx.components.baseClasses.FxComponent;
+import mx.events.TextOperationEvent;
+
+import mx.events.FlexEvent;
+
+import flashx.tcal.events.SelectionEvent;
+import flashx.tcal.formats.LineBreak;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispached after the selectionAnchorPosition and/or
+ *  selectionActivePosition properties have changed
+ *  due to a user interaction.
+ */
+[Event(name="selectionChange", type="mx.events.AnimationEvent")]
+
+/**
+ *  Dispatched before a user editing operation occurs.
+ *  You can alter the operation, or cancel the event
+ *  to prevent the operation from being processed.
+ */
+[Event(name="changing", type="mx.events.TextOperationEvent")]
+
+/**
+ *  Dispatched after a user editing operation is complete.
+ */
+[Event(name="change", type="mx.events.TextOperationEvent")]
+
+/**
+ *  Documentation is not currently available.
+ */
+public class FxTextBase extends FxComponent
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+	public function FxTextBase()
+	{
+		super();
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  enabled
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function set enabled(value:Boolean):void
+	{
+		if (value == enabled)
+			return;
+
+		super.enabled = value;
+
+		invalidateSkinState();
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  selectionActivePosition
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _selectionActivePosition:int = -1;
+
+	/**
+	 *  @private
+	 */
+	private var selectionActivePositionChanged:Boolean = false;
+
+	[Bindable("selectionChange")]
+
+	/**
+	 *  The active position of the selection.
+	 *  The "active" point is the end of the selection
+	 *  which is changed when the selection is extended.
+	 *  The active position may be either the start
+	 *  or the end of the selection.
+	 *
+	 *  @default -1
+	 */
+	public function get selectionActivePosition():int
+	{
+		return _selectionActivePosition;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set selectionActivePosition(value:int):void
+	{
+		if (value == _selectionActivePosition)
+			return;
+
+		_selectionActivePosition = value;
+		selectionActivePositionChanged = true;
+
+		invalidateProperties();
+
+		dispatchEvent(new FlexEvent(FlexEvent.SELECTION_CHANGE));
+	}
+
+	//----------------------------------
+	//  selectionAnchorPosition
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _selectionAnchorPosition:int = -1;
+
+	/**
+	 *  @private
+	 */
+	private var selectionAnchorPositionChanged:Boolean = false;
+
+	[Bindable("selectionChange")]
+
+	/**
+	 *  The anchor position of the selection.
+	 *  The "anchor" point is the stable end of the selection
+	 *  when the selection is extended.
+	 *  The anchor position may be either the start
+	 *  or the end of the selection.
+	 *
+	 *  @default -1
+	 */
+	public function get selectionAnchorPosition():int
+	{
+		return _selectionAnchorPosition;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set selectionAnchorPosition(value:int):void
+	{
+		if (value == _selectionAnchorPosition)
+			return;
+
+		_selectionAnchorPosition = value;
+		selectionAnchorPositionChanged = true;
+
+		invalidateProperties();
+
+		dispatchEvent(new FlexEvent(FlexEvent.SELECTION_CHANGE));
+	}
+
+    //----------------------------------
+	//  text
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _text:String = "";
+
+	/**
+	 *  @private
+	 */
+	private var textChanged:Boolean = false;
+
+	[Bindable("change")]
+	[Bindable("textChanged")]
+
+	/**
+	 *  The text String displayed by this TextInput.
+	 */
+	public function get text():String
+	{
+		return _text;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set text(value:String):void
+	{
+		if (value == _text)
+			return;
+
+		_text = value;
+		textChanged = true;
+
+		invalidateProperties();
+
+		dispatchEvent(new Event("textChanged"));
+	}
+
+    //----------------------------------
+	//  textView
+    //----------------------------------
+
+    [SkinPart]
+
+	/**
+	 *  The TextView that must be present
+	 *  in any skin assigned to this TextInput.
+	 */
+	public var textView:TextView;
+
+	//--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Pushes various TextInput properties down into the TextView.
+	 */
+    override protected function commitProperties():void
+	{
+		super.commitProperties();
+
+		if (textChanged)
+		{
+			textView.text = _text;
+			textChanged = false;
+		}
+
+		if (selectionAnchorPositionChanged)
+		{
+			textView.selectionAnchorPosition = _selectionAnchorPosition;
+			selectionAnchorPositionChanged = false
+		}
+
+		if (selectionActivePositionChanged)
+		{
+			textView.selectionActivePosition = _selectionActivePosition;
+			selectionActivePositionChanged = false
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function partAdded(partName:String, instance:Object):void
+	{
+		super.partAdded(partName, instance);
+
+		if (instance == textView)
+		{
+			// Start listening for various events from the TextView.
+
+			textView.addEventListener(SelectionEvent.SELECTION_CHANGE,
+									  textView_selectionChangeHandler);
+
+			textView.addEventListener("changing",
+                                      textView_changingHandler);
+
+			textView.addEventListener("change",
+                                      textView_changeHandler);
+
+            textView.addEventListener(FlexEvent.ENTER,
+                                      textView_enterHandler);
+
+            // Set the initial text value
+            textView.text = _text;
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function partRemoved(partName:String, instance:Object):void
+	{
+		super.partRemoved(partName, instance);
+
+		if (instance == textView)
+		{
+			// Stop listening for various events from the TextView.
+
+			textView.removeEventListener(SelectionEvent.SELECTION_CHANGE,
+										 textView_selectionChangeHandler);
+
+			textView.removeEventListener("changing",
+                                         textView_changingHandler);
+
+			textView.removeEventListener("change",
+                                          textView_changeHandler);
+
+			textView.removeEventListener(FlexEvent.ENTER,
+                                         textView_enterHandler);
+		}
+	}
+
+	//--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Called when the TextView dispatches a 'selectionChange' event.
+	 */
+	private function textView_selectionChangeHandler(event:Event):void
+	{
+		// Update our storage variables for the selection indices.
+		_selectionAnchorPosition = textView.selectionAnchorPosition;
+		_selectionActivePosition = textView.selectionActivePosition;
+
+		// Redispatch the event that came from the TextView.
+		dispatchEvent(event);
+	}
+
+	/**
+	 *  @private
+	 *  Called when the TextView dispatches a 'change' event
+	 *  after an editing operation.
+	 */
+	private function textView_changeHandler(event:TextOperationEvent):void
+	{
+		// Update our storage variable for the text string.
+		_text = textView.text;
+
+		// Redispatch the event that came from the TextView.
+		dispatchEvent(event);
+	}
+
+	/**
+	 *  @private
+	 *  Called when the TextView dispatches a 'changing' event
+	 *  before an editing operation.
+	 */
+	private function textView_changingHandler(event:TextOperationEvent):void
+	{
+		// Redispatch the event that came from the TextView.
+		var newEvent:Event = event.clone();
+		dispatchEvent(newEvent);
+
+		// If the event dispatched from this TextInput is canceled,
+		// cancel the one from the TextView, which will prevent
+		// the editing operation from being processed.
+		if (newEvent.isDefaultPrevented())
+			event.preventDefault();
+	}
+
+	/**
+	 *  @private
+	 *  Called when the TextView dispatches an 'enter' event
+	 *  in response to the Enter key.
+	 */
+	private function textView_enterHandler(event:Event):void
+	{
+		// Redispatch the event that came from the TextView.
+		dispatchEvent(event);
+	}
+}
+
+}


Dammit! Id3 tags are not working at all. I'm checking the crossdomain.xml. Grr!
Removed debugging.

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

--- src/as/com/threerings/flash/media/Mp3AudioPlayer.as
+++ src/as/com/threerings/flash/media/Mp3AudioPlayer.as
@@ -13,6 +13,7 @@

 import flash.media.Sound;
 import flash.media.SoundChannel;
+import flash.media.SoundLoaderContext;
 import flash.media.SoundTransform;

 import flash.net.URLRequest;
@@ -27,7 +28,6 @@
 {
     public function Mp3AudioPlayer (loop :Boolean = false)
     {
-        trace(".............. v3");
         _loop = loop;

         _positionChecker = new Timer(25);
@@ -45,7 +45,7 @@
         _sound.addEventListener(Event.ID3, handleId3); // TODO
         _sound.addEventListener(IOErrorEvent.IO_ERROR, handleError);
         _sound.addEventListener(Event.COMPLETE, handleSoundComplete);
-        _sound.load(new URLRequest(url));
+        _sound.load(new URLRequest(url), new SoundLoaderContext(1000, true));
         play();
     }

@@ -177,7 +177,7 @@

     protected function handleId3 (event :Event) :void
     {
-        trace("got ID3: Duration is now : " + _sound.length);
+        trace("Got ID3");
     }

     /**


If we're in the middle of trying to load up one of our files, don't go and do it again, instead wait til it's done and just hear about it then.

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

--- src/as/com/threerings/media/tile/TileDataPack.as
+++ src/as/com/threerings/media/tile/TileDataPack.as
@@ -93,11 +93,16 @@

         if (_cache.containsKey(key)) {
             callback(_cache.get(key));
+        } else if (_pending.containsKey(key)) {
+            _pending.get(key).push(callback);
         } else {
+            _pending.put(key, [callback]);
             MultiLoader.getContents(PngRecolorUtil.recolorPNG(getFile(path), zations),
                 function(result :Bitmap) :void {
                     _cache.put(key, result);
-                    callback(result);
+                    for each (var func :Function in _pending.remove(key)) {
+                        func(result);
+                    }
                 });
         }
     }
@@ -115,5 +120,8 @@

     /** Cache of images loaded from this data pack. */
     protected var _cache :Map = Maps.newMapOf(String);
+
+    /** Any images we're in the process of resolving, map their key to a list of listeners*/
+    protected var _pending :Map = Maps.newMapOf(String);
 }
 }


Fix documentation on UpdateEvent class

Fix documentation on UpdateEvent class

--- src/org/flintparticles/common/events/UpdateEvent.as
+++ src/org/flintparticles/common/events/UpdateEvent.as
@@ -33,7 +33,8 @@
 	import flash.events.Event;

 	/**
-	 * The class for particle related events dispatched by classes in the Flint project.
+	 * The UpdateEvent is dispatched from the FrameUpdater utility every frame, to all emitters that are
+	 * being updated by Flint, to trigger the update cycle on each emitter.
 	 */
 	public class UpdateEvent extends Event
 	{


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

--- frameworks/projects/advancedgrids/src/mx/collections/ISummaryCalculator.as
+++ frameworks/projects/advancedgrids/src/mx/collections/ISummaryCalculator.as
@@ -0,0 +1,158 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.collections
+{
+
+/**
+ *  The ISummaryCalculator interface defines the interface
+ *  implemented by custom summary calculator classes.
+ *  An instance of a class that implements this interface can be passed
+ *  to the summaryOperation property of the SummaryField2 Class.
+ *
+ *
Implement the methods of this interface in two groups. The first group consists of the
+ *  summaryCalculationBegin(), calculateSummary(), and returnSummary() methods.
+ *  Use these methods to compute summary of the values.

+ *
+ *
The second group consists of the
+ *  summaryOfSummaryCalculationBegin(), calculateSummaryOfSummary(),
+ *  and returnSummaryOfSummary() methods.
+ *  Use these methods to compute summary of summary values.

+ *
+ *  @see mx.collections.SummaryField2
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public interface ISummaryCalculator
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Flex calls this method to start the computation of a summary value.
+     *
+     *  @param field The SummaryField2 for which the summary needs to calculated.
+     *
+     *  @return An Object initialized for the summary calculation.
+     *  Use this Object to hold any information necessary to perform the calculation.
+     *  You pass this Object to subsequent calls to the calculateSummary()
+     *  and returnSummary() methods.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function summaryCalculationBegin(field:SummaryField2):Object;
+
+    /**
+     *  Flex calls this method when a new value needs to be added to the summary value.
+     *
+     *  @param data The Object returned by the call to the summaryCalculationBegin() method,
+     *  or calculated by a previous call to the calculateSummary() method.
+     *  Use this Object to hold information necessary to perform the calculation.
+     *  This method modifies this Object; it does not return a value.
+     *
+     *  @param field The SummaryField2 for which the summary needs to calculated.
+     *
+     *  @param rowData The object representing the rows data that is being analyzed.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function calculateSummary(data:Object, field:SummaryField2, rowData:Object):void;
+
+    /**
+     *  Flex calls this method to end the computation of the summary value.
+     *
+     *  @param data The Object returned by the call to the calculateSummary() method.
+     *  Use this Object to hold information necessary to perform the calculation.
+     *
+     *  @param field The SummaryField2 for which the summary needs to calculated.
+     *
+     *  @return The summary value.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function returnSummary(data:Object, field:SummaryField2):Number;
+
+    /**
+     *  Flex calls this method to start calculation of summary out of summary values.
+     *  Calculating the average value of a group of averages is an example of
+     *  an calculation of summary out of summary values.
+     *
+     *  @param value The Object returned by the call to the calculateSummary() method
+     *  for a previous summary calculation.
+     *  Use this Object to hold the information necessary to perform the calculation.
+     *
+     *  @param field The SummaryField2 for which the summary needs to calculated.
+     *
+     *  @return An Object initialized for the summary calculation.
+     *  Use this Object to hold any information necessary to perform the calculation.
+     *  You pass this Object to subsequent calls to the calculateSummaryOfSummary()
+     *  and returnSummaryOfSummary() methods.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function summaryOfSummaryCalculationBegin(value:Object, field:SummaryField2):Object;
+
+    /**
+     *  Flex calls this method when a new summary value needs to be added to the already computed summary.
+     *
+     *  @param value The Object returned by a call the summaryOfSummaryCalculationBegin() method,
+     *  or calculated by a previous call to the calculateSummaryOfSummary() method.
+     *  This method modifies this Object; it does not return a value.
+     *
+     *  @param newValue The Object returned by the call to the returnSummary() method
+     *  for a previous aggregation.
+     *
+     *  @param field The SummaryField2 for which the summary needs to calculated.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function calculateSummaryOfSummary(value:Object, newValue:Object, field:SummaryField2):void;
+
+    /**
+     *  Flex calls this method to end the summary calculation.
+     *
+     *  @param value The Object returned by a call to the calculateSummaryOfSummary() method
+     *  that is used to store the summary calculation results.
+     *  This method modifies this Object; it does not return a value.
+     *
+     *  @param field The SummaryField2 for which the summary needs to calculated.
+     *
+     *  @return The summary value.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    function returnSummaryOfSummary(value:Object, field:SummaryField2):Number;
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 4111
Author:   chaase@adobe.com
Date:     2008-11-14T16:39:46.711628Z

Log Message:
-----------
Makes auto-reversal of transitions work more completely and correctly, fixing some API issues and other related animation/effect issues along the way. Seeking behavior in effects is improved (although still far from perfect, especially for non-playing effects), and dynamic behavior of effects (picking up values dynamically from the environment) is improved.

QE Notes: better seek() behavior, can just call it on non-playing effects and it will automatically play/pause the effect if necessary
Doc Notes: None
Bugs: sdk-17294, sdk-16595, sdk-18104, sdk-18105, sdk-18106, sdk-18107
Reviewer: Jason
tests: checkintests, Mustella: tests/Effects, tests/gumbo/effects tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/Transition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/EffectEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.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/effects/Parallel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Sequence.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/mx/effects/AddAction.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as
@@ -122,8 +122,6 @@
         {
             if (!isNaN(xTo) && !isNaN(xBy))
                 xFrom = xTo - xBy;
-            else if (propertyChanges && propertyChanges.start["x"] !== undefined)
-                xFrom = propertyChanges.start["x"];
         }
 		if (isNaN(xTo))
 		{
@@ -145,8 +143,6 @@
         {
             if (!isNaN(yTo) && !isNaN(yBy))
                 yFrom = yTo - yBy;
-            else if (propertyChanges && propertyChanges.start["y"] !== undefined)
-                yFrom = propertyChanges.start["y"];
         }
 		if (isNaN(yTo))
 		{
@@ -174,6 +170,5 @@

         super.play();
     }
-
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4255
Author:   rfrishbe@adobe.com
Date:     2008-12-08T23:32:25.912094Z

Log Message:
-----------
GraphicElements are no longer supported in DataGroup.  This allowed us to clean up a lot of the code (hurray!)

Moreover, there are some other cleanups.  We now support null items.  Item renderers are strongly typed as IVisualElements now (an item renderer must be an IVisualElement and a DisplayObject).  We also don't dispatch events when changing the itemRenderer or itemRendererFunction anymore as there's no need to do it and no need to make these properties bindable.

Also a minor fix in FlexNativeMenu where the binding metadata was using the wrong event.

QE Notes: Steve's already changed mustella tests for me.
Doc Notes: None
Bugs: SDK-18040, SDK-18046, SDK-18045
Reviewer: Glenn
tests: checkintests, mustella DataGroup, FxDataContainer, FxList, Group

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -1,22 +1,18 @@
 package mx.components
 {
 import flash.display.DisplayObject;
-import flash.events.Event;

 import mx.collections.IList;
 import mx.components.baseClasses.GroupBase;
 import mx.core.IDataRenderer;
 import mx.core.IFactory;
 import mx.core.IVisualElement;
-import mx.core.IVisualElementContainer;
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
 import mx.events.ItemExistenceChangedEvent;
-import mx.graphics.graphicsClasses.GraphicElement;
 import mx.layout.ILayoutElement;
 import mx.layout.LayoutElementFactory;
-import mx.styles.IStyleClient;

 /**
  *  Dispatched when an item is added to the content holder.
@@ -56,6 +52,15 @@
         super();
     }

+    /**
+     *  @private
+     *  flag to indicate whether a child in the item renderer has a non-zero layer, requiring child re-ordering.
+     */
+    private var _layeringFlags:uint = 0;
+
+    private static const LAYERING_ENABLED:uint =    0x1;
+    private static const LAYERING_DIRTY:uint =      0x2;
+
     private var itemRendererRegistry:Array = [];

     //----------------------------------
@@ -69,15 +74,6 @@
     private var _itemRenderer:IFactory;

     private var itemRendererChanged:Boolean;
-
-    /**
-     *  @private
-     *  flag to indicate whether a child in the item renderer has a non-zero layer, requiring child re-ordering.
-     */
-    private var _layeringFlags:uint = 0;
-
-    private static const LAYERING_ENABLED:uint = 	0x1;
-    private static const LAYERING_DIRTY:uint = 		0x2;

     [Inspectable(category="Data")]

@@ -106,8 +102,6 @@
         invalidateDisplayList();

         itemRendererChanged = true;
-
-        dispatchEvent(new Event("itemRendererChanged"));
     }

     //----------------------------------
@@ -148,8 +142,6 @@
         invalidateDisplayList();

         itemRendererChanged = true;
-
-        dispatchEvent(new Event("itemRendererChanged"));
     }

     private var _dataProvider:IList;
@@ -175,20 +167,12 @@
     public function set dataProvider(value:IList):void
     {
         if (_dataProvider)
-        {
             _dataProvider.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
-        }

         _dataProvider = value;

-        // Need to convert null to undefined here, since subsequent content checks test for undefined
-        if (_dataProvider === null)
-            _dataProvider = undefined;
-
-        if (_dataProvider is IList)
-        {
+        if (_dataProvider)
             _dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true);
-        }

         dataProviderChanged = true;
         invalidateProperties();
@@ -204,22 +188,6 @@
         for (var idx:int = numChildren; idx > 0; idx--)
             super.removeChildAt(0);

-        // TODO: get rid of this code
-        // An item renderer who's rendering a graphic may not be used anymore and is
-        // removed above.  However, the graphic item's display object is still
-        // attached to that item renderer.  We need to clear out these display objects.
-        // For now, this is a cheap way to do it.
-        // This might orphan the old display object in its previous container.
-        if (dataProvider != null)
-        {
-            for (var j:int = 0; j < dataProvider.length; j++)
-            {
-                var item:GraphicElement = dataProvider.getItemAt(j) as GraphicElement;
-                if (item)
-                    item.displayObject = item.sharedDisplayObject = null;
-            }
-        }
-
         if (_dataProvider != null)
         {
             for (var i:int = 0; i < _dataProvider.length; i++)
@@ -228,6 +196,12 @@
             }
         }
     }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Item -> Renderer mapping
+    //
+    //--------------------------------------------------------------------------

     /**
      *  Create the item renderer for the item, if needed.
@@ -236,26 +210,21 @@
      *

if itemRendererFunction is defined, call
      *  it to get the renderer factory and instantiate it

      *
if itemRenderer is defined, instantiate one

-     *
if item is a GraphicElement, create the display
-     *  object for it

-     *
if item is a DisplayObject, use it directly

+     *
if item is an IVisualElement and a DisplayObject, use
+     *  it directly

      *
      *  @param item The data element.
      *
      *  @return The renderer that represents the data elelement.
      */
-    protected function createRendererForItem(item:Object, index:int):Object
-    {
-        var myItemRenderer:Object;
-
-        if (item === null)
-            throw new Error("DataGroup content can not contain null items.");
+    protected function createRendererForItem(item:Object, index:int):IVisualElement
+    {
+        var myItemRenderer:IVisualElement;

         // Rules for lookup:
         // 1. if itemRendererFunction is defined, call it to get the renderer factory and instantiate it
         // 2. if itemRenderer is defined, instantiate one
-        // 3. if item is a GraphicElement, create the display object for it
-        // 4. if item is a DisplayObject, use it directly
+        // 3. if item is an IVisualElement and a DisplayObject, use it directly

         // 1. if itemRendererFunction is defined, call it to get the renderer factory and instantiate it
         if (itemRendererFunction != null)
@@ -272,27 +241,21 @@
             myItemRenderer = itemRenderer.newInstance();
         }

-        // 3. if item is a GraphicElement, create the display object for it
-        if (!myItemRenderer && item is GraphicElement)
-        {
-            var graphicItem:GraphicElement = GraphicElement(item);
-            graphicItem.parent = this;
-
-            if (!graphicItem.displayObject)
-                graphicItem.displayObject = graphicItem.createDisplayObject();
-
-            myItemRenderer = graphicItem;
-        }
-
-        // 4. if item is a DisplayObject, use it directly
-        if (!myItemRenderer && item is DisplayObject)
-        {
-            myItemRenderer = DisplayObject(item);
-        }
-
-        // Set the renderer's data to the item, but only if the item and renderer are different
-        if (myItemRenderer is IDataRenderer && myItemRenderer != item)
-            IDataRenderer(myItemRenderer).data = item;
+        // 3. if item is an IVisualElement and a DisplayObject, use it directly
+        if (!myItemRenderer && item is IVisualElement && item is DisplayObject)
+        {
+            myItemRenderer = IVisualElement(item);
+        }
+
+        // Couldn't find item renderer.  Throw an RTE.
+        if (!myItemRenderer)
+        {
+            if (item is IVisualElement || item is DisplayObject)
+                throw new Error("DataGroup cannot display visual elements directly unless the elements " +
+                        "are display objects and implement IVisualElement");
+            else
+                throw new Error("Could not create an item renderer for " + item);
+        }

         return myItemRenderer;
     }
@@ -304,7 +267,7 @@
      *  @param index The item index to associate the renderer with
      *  @param myItemRenderer The item renderer
      */
-    protected function registerRenderer(index:int, myItemRenderer:Object):void
+    protected function registerRenderer(index:int, myItemRenderer:IVisualElement):void
     {
         itemRendererRegistry.splice(index, 0, myItemRenderer);
     }
@@ -316,9 +279,39 @@
      *  @param index The item index to dis-associate the renderer with
      *  @param myItemRenderer The item renderer
      */
-    protected function unregisterRenderer(index:int, myItemRenderer:Object):void
+    protected function unregisterRenderer(index:int, myItemRenderer:IVisualElement):void
     {
         itemRendererRegistry.splice(index, 1);
+    }
+
+    /**
+     *  Returns the instance of the renderer at the specified index. If the item
+     *  at that index is a visual element and uses no renderer, then the visual
+     *  element will be returned.
+     *
+     *  @param index The item index whose renderer is to be returned.
+     *
+     *  @return The renderer instance for the specified item. If the item
+     *          is a visual element and has no item renderer,
+     *          the visual element itself is returned.
+     */
+    public function getItemRenderer(index:int):IVisualElement
+    {
+        return itemRendererRegistry[index];
+    }
+
+    /**
+     *  Returns the item index associated with the specified renderer.
+     *
+     *  @param renderer The renderer whose item you want to retrieve.
+     *
+     *  @return The item index associated with the specified renderer,
+     *          or -1 if there is no item associated with the passed in
+     *          renderer.
+     */
+    public function getRendererItem(renderer:IVisualElement):int
+    {
+        return itemRendererRegistry.indexOf(renderer);
     }

     /**
@@ -344,61 +337,11 @@
         {
         	manageDisplayObjectLayers();
         }
-
-        // Check whether we manage the elements, or are they managed by an ItemRenderer
-        // TODO EGeorgie: we need to optimize this, iterating through all the elements is slow.
-        // Validate element properties
-        var length:int = dataProvider ? dataProvider.length : 0;
-        for (var i:int = 0; i < length; i++)
-        {
-            var element:GraphicElement = dataProvider.getItemAt(i) as GraphicElement;
-            if (element)
-                element.validateProperties();
-        }
-    }
-
-    /**
-     *  @private
-     */
-    override public function validateSize(recursive:Boolean = false):void
-    {
-        // Since GraphicElement is not ILayoutManagerClient, we need to make sure we
-        // validate sizes of the elements, even in cases where recursive==false.
-
-        // Check whether we manage the elements, or are they managed by an ItemRenderer
-        // TODO EGeorgie: we need to optimize this, iterating through all the elements is slow.
-        // Validate element size
-        var length:int = dataProvider ? dataProvider.length : 0;
-        for (var i:int = 0; i < length; i++)
-        {
-            var element:GraphicElement = dataProvider.getItemAt(i) as GraphicElement;
-            if (element)
-                element.validateSize();
-        }
-
-        super.validateSize(recursive);
-    }
-
-    /**
-     *  @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
-    {
-        super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-        // TODO EGeorgie: we need to optimize this, iterating through all the elements is slow.
-        // Iterate through the graphic elements, clear their graphics and draw them
-        var length:int = dataProvider ? dataProvider.length : 0;
-        for (var i:int = 0; i < length; i++)
-        {
-            var element:GraphicElement = dataProvider.getItemAt(i) as GraphicElement;
-            if (element)
-                element.validateDisplayList();
-        }
-    }
-
-   private function manageDisplayObjectLayers():void
-    {
+    }
+
+    private function manageDisplayObjectLayers():void
+    {
+        // itemRenderers should be both DisplayObjects and IVisualElements
         var topLayerItems:Vector.<IVisualElement>;
         var bottomLayerItems:Vector.<IVisualElement>;
         var keepLayeringEnabled:Boolean = false;
@@ -409,33 +352,32 @@

         // Iterate through all of the items
         var len:int = itemRendererRegistry.length;
-        var displayObject:DisplayObject;

         for (var i:int = 0; i < len; i++)
         {
-            var item:Object = itemRendererRegistry[i];
-
-            var layer:Number = 0;
-            if (item is IVisualElement)
-                layer = (item as IVisualElement).layer;
+            var myItemRenderer:IVisualElement = itemRendererRegistry[i];
+
+            var layer:Number = myItemRenderer.layer;
+
             if (layer != 0)
             {
                 if (layer > 0)
                 {
                     if (topLayerItems == null) topLayerItems = new Vector.<IVisualElement>();
-                    topLayerItems.push(item);
+                    topLayerItems.push(myItemRenderer);
                     continue;
                 }
                 else
                 {
                     if (bottomLayerItems == null) bottomLayerItems = new Vector.<IVisualElement>();
-                    bottomLayerItems.push(item);
+                    bottomLayerItems.push(myItemRenderer);
                     continue;
                 }
             }
-            displayObject = (item is GraphicElement)? GraphicElement(item).displayObject:item as DisplayObject;
-            super.setChildIndex(displayObject,insertIndex++);
-        }
+
+            super.setChildIndex(myItemRenderer as DisplayObject, insertIndex++);
+        }
+
         if (topLayerItems != null)
         {
             keepLayeringEnabled = true;
@@ -443,9 +385,8 @@
             len = topLayerItems.length;
             for (i=0;i<len;i++)
             {
-            	item = topLayerItems[i];
-	            displayObject = (item is GraphicElement)? GraphicElement(item).displayObject:item as DisplayObject;
-	            super.setChildIndex(displayObject,insertIndex++);
+            	myItemRenderer = topLayerItems[i];
+	            super.setChildIndex(myItemRenderer as DisplayObject, insertIndex++);
             }
         }

@@ -459,9 +400,8 @@

             for (i=0;i<len;i++)
             {
-            	item = bottomLayerItems[i];
-	            displayObject = (item is GraphicElement)? GraphicElement(item).displayObject:item as DisplayObject;
-	            super.setChildIndex(displayObject,insertIndex++);
+            	myItemRenderer = bottomLayerItems[i];
+	            super.setChildIndex(myItemRenderer as DisplayObject, insertIndex++);
             }
         }

@@ -517,38 +457,19 @@
      */
     protected function itemAdded(item:Object, index:int):void
     {
-        var childDO:DisplayObject;
-        var myItemRenderer:Object;
-
-        if (item is GraphicElement)
-        {
-            var graphicItem:GraphicElement = GraphicElement(item);
-
-            // If a styleable GraphicElement is being added,
-            // build its protochain for use by getStyle().
-            if (item is IStyleClient)
-                IStyleClient(item).regenerateStyleCache(true);
-
-            myItemRenderer = createRendererForItem(graphicItem, index);
-        }
-        else
-        {
-            myItemRenderer = createRendererForItem(item, index);
-        }
-
-
+        var myItemRenderer:IVisualElement = createRendererForItem(item, index);
+
+        // Set the renderer's data to the item, but only if the item and renderer are different
+        if (myItemRenderer is IDataRenderer && myItemRenderer != item)
+            IDataRenderer(myItemRenderer).data = item;
+
         registerRenderer(index, myItemRenderer);

-        if (myItemRenderer is GraphicElement)
-            childDO = GraphicElement(myItemRenderer).displayObject;
-        else
-            childDO = DisplayObject(myItemRenderer);
-
-        addItemToDisplayList(childDO, item, index);
+        addItemToDisplayList(myItemRenderer as DisplayObject, item, index);

         dispatchEvent(new ItemExistenceChangedEvent(
                       ItemExistenceChangedEvent.ITEM_ADD, false, false,
-                      item, index, getItemRenderer(index)));
+                      item, index, myItemRenderer));

         invalidateSize();
         invalidateDisplayList();
@@ -565,41 +486,21 @@
      */
     protected function itemRemoved(item:Object, index:int):void
     {
-        var renderer:Object = getItemRenderer(index);
-        var childDO:DisplayObject = item as DisplayObject;
+        var myItemRenderer:IVisualElement = getItemRenderer(index);

         dispatchEvent(new ItemExistenceChangedEvent(
                       ItemExistenceChangedEvent.ITEM_REMOVE, false, false,
-                      item, index, renderer));
-
-        // if either the item or the renderer is a GraphicElement,
-        // release the display objects
-        if (item && (item is GraphicElement))
-        {
-            item.parent = null;
-            item.sharedDisplayObject = null;
-        }
-
-        // determine who the child display object is
-        if (renderer && (renderer is GraphicElement))
-        {
-            childDO = GraphicElement(renderer).displayObject;
-        }
-        else if (renderer && (renderer is DisplayObject))
-        {
-            childDO = renderer as DisplayObject;
-        }
+                      item, index, myItemRenderer));

         // If the item and renderer are different objects, set the renderer data to
         // null here to clear it out. Otherwise, the renderer keeps a reference to the item,
         // which can cause problems later.
-        if (item && renderer && item != renderer)
-            renderer.data = null;
-
-        if (childDO)
-            super.removeChild(childDO);
-
-        unregisterRenderer(index, renderer);
+        if (myItemRenderer is IDataRenderer && myItemRenderer != item)
+            IDataRenderer(myItemRenderer).data = null;
+
+        super.removeChild(myItemRenderer as DisplayObject);
+
+        unregisterRenderer(index, myItemRenderer);

         invalidateSize();
         invalidateDisplayList();
@@ -620,45 +521,23 @@
      */
     protected function addItemToDisplayList(child:DisplayObject, item:Object, index:int = -1):DisplayObject
     {
-        var host:DisplayObject;
-
-        // TODO (rfrishbe): need to check for DisplayObject?
-        if (item is IVisualElement)
-        {
-            host = IVisualElement(item).parent;
-        }
-        else if (item is DisplayObject)
-            host = DisplayObject(item).parent;
-
-        // Remove the item from the group if that group isn't this group
-        if (host && host is IVisualElementContainer && host != this)
-            IVisualElementContainer(host).removeElement(item);
-        else if (host && host is DataGroup && host != this)
-        {
-            var dp:IList = DataGroup(host).dataProvider;
-            var index:int = dp.getItemIndex(item);
-            dp.removeItemAt(index);
-        }
-
-        // Calling removeItem should have already removed the child. This
-        // should handle the case when we don't call removeItem
-        if (child.parent)
-        {
-            if (child.parent == this)
-            {
-                var insertIndex:int;
-                if (index == -1)
-                    insertIndex = super.numChildren - 1;
-                else if (index == 0)
-                    insertIndex = 0;
-                else
-                    insertIndex = index;
-
-                super.setChildIndex(child, insertIndex);
-                return child;
-            }
-            else
-                child.parent.removeChild(child);
+        // TODO: do we need this case (parented by me previously)?
+        if (child.parent && child.parent == this)
+        {
+            var insertIndex:int;
+            if (index == -1)
+                insertIndex = super.numChildren - 1;
+            else if (index == 0)
+                insertIndex = 0;
+            else
+                insertIndex = index;
+
+            super.setChildIndex(child, insertIndex);
+            return child;
+        }
+        else if (child.parent && child.parent is DataGroup)
+        {
+            DataGroup(child.parent)._removeChild(child);
         }

         if ((_layeringFlags & LAYERING_ENABLED) ||
@@ -802,38 +681,22 @@

     //--------------------------------------------------------------------------
     //
-    //  Item -> Renderer mapping
+    //  Methods: Access to overridden methods of base classes
     //
     //--------------------------------------------------------------------------
-
-    /**
-     *  Returns the instance of the renderer at the specified index. If the item
-     *  at that index is a visual element and uses no renderer, then the visual
-     *  element will be returned.
-     *
-     *  @param index The item index whose renderer is to be returned.
-     *
-     *  @return The renderer instance for the specified item. If the item
-     *          is a visual element and has no item renderer,
-     *          the visual element itself is returned.
-     */
-    public function getItemRenderer(index:int):Object
-    {
-        return itemRendererRegistry[index];
-    }
-
-    /**
-     *  Returns the item index associated with the specified renderer.
-     *
-     *  @param renderer The renderer whose item you want to retrieve.
-     *
-     *  @return The item index associated with the specified renderer,
-     *          or -1 if there is no item associated with the passed in
-     *          renderer.
-     */
-    public function getRendererItem(renderer:Object):int
-    {
-        return itemRendererRegistry.indexOf(renderer);
+
+    /**
+     *  @private
+     *  This method allows access to the base class's implementation
+     *  of removeChild() (UIComponent's version), which can be useful since components
+     *  can override removeChild() and thereby hide the native implementation.  For
+     *  instance, we override removeChild() here to throw an RTE to discourage people
+     *  from using this method.  We need this method so we can remove children
+     *  that were previously attached to another DataGroup (see addItemToDisplayList).
+     */
+    private function _removeChild(child:DisplayObject):DisplayObject
+    {
+        return super.removeChild(child);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 10332
Author:   hmuller@adobe.com
Date:     2009-09-16T23:24:55.421539Z

Log Message:
-----------
Added Scroller.measuredSizeIncludesScrollBars property and changed TextAreaSkin
to set this property to false.

After a dataProvider change DataGroup/commitProperties() now resets the scrollPositions
-after- the new ItemRenderers have been created with initializeDataProviders().

QE Notes: Mustella TextArea, DataGroup, Scroller, and List tests pass.
Doc Notes:
Bugs: sdk-22890, sdk-22469, sdk-23175
Reviewer: Jason

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/TextAreaSkin.mxml</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/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -700,10 +700,6 @@
     {
         if (dataProviderChanged || itemRendererChanged || useVirtualLayoutChanged)
         {
-            if (dataProviderChanged)
-                verticalScrollPosition = horizontalScrollPosition = 0;
-
-            dataProviderChanged = false;
             itemRendererChanged = false;
             useVirtualLayoutChanged = false;

@@ -718,6 +714,14 @@

             initializeDataProvider();

+            // Don't reset the scroll positions until the new ItemRenderers are created
+            // with initializeDataProvider, see bug https://bugs.adobe.com/jira/browse/SDK-23175
+            if (dataProviderChanged)
+            {
+                dataProviderChanged = false;
+                verticalScrollPosition = horizontalScrollPosition = 0;
+            }
+
             maskChanged = true;
         }


override the styleName setter function to fix the change skin bug

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -419,6 +419,15 @@
     /**
      *  @private
      */
+    override public function set styleName(value:Object):void
+	{
+		clearStyle("skinClass");
+		super.styleName = value;
+	}
+
+    /**
+     *  @private
+     */
     private function validateSkinChange():void
     {
         // If our new skin Class happens to match our existing skin Class there is no


Transferred from the Adobe Open Source Subversion Repository

Revision: 12074
Author:   gruehle@adobe.com
Date:     2009-11-21T01:02:03.186839Z

Log Message:
-----------
Change baseColor to chromeColor.

QE notes: Tests need to be updated.
Doc notes: ASDoc has been updated. Other docs need updating.
Bugs: SDK-24298
Reviewer: Ely
Tests run: checkintests, qe cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
112 paths were modified

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -35,14 +35,14 @@
 //--------------------------------------

 /**
- *  @copy spark.components.supportClasses.GroupBase#style:baseColor
+ *  @copy spark.components.supportClasses.GroupBase#style:chromeColor
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Style(name="baseColor", type="uint", format="Color", inherit="yes", theme="spark")]
+[Style(name="chromeColor", type="uint", format="Color", inherit="yes", theme="spark")]

 /**
  *  Name of the skin class to use for this component when a validation error occurs.


In validateSkinChange(), if reloading a skin, detach the error skin if there is one, and reattach it, after loading the new skin to ensure it stays on top.  [SDK-30461].

git-svn-id: 7d913817b0a978d84de757191e4bce372605a781@1403831 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -445,8 +445,13 @@
         if (!skipReload)
         {
             if (skin)
-                detachSkin();
-            attachSkin();
+            {
+                detachSkin();
+                // If there is an error skin remove it since it has to go on top of the new skin.
+                removeErrorSkin();
+            }
+            attachSkin();
+            updateErrorSkin();
         }
     }

@@ -831,12 +836,20 @@
         }
         else
         {
-            if (errorObj)
-                super.removeChild(errorObj);
-
+            removeErrorSkin();
+        }
+    }
+
+    private function removeErrorSkin():void
+    {
+        if (errorObj)
+        {
+            super.removeChild(errorObj);
             errorObj = null;
         }
-    }
+
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Methods - Parts


Make the badge clickable.

Make the badge clickable.

--- swfcat.as
+++ swfcat.as
@@ -330,12 +330,17 @@
     }
 }

+import flash.events.MouseEvent;
+import flash.net.navigateToURL;
+import flash.net.URLRequest;
 import flash.text.TextFormat;
 import flash.text.TextField;
 import flash.utils.getTimer;

 class Badge extends flash.display.Sprite
 {
+    private const FLASHPROXY_INFO_URL:String = "https://crypto.stanford.edu/flashproxy/";
+
     /* Number of proxy pairs currently connected. */
     private var num_proxy_pairs:int = 0;
     /* Number of proxy pairs ever connected. */
@@ -385,6 +390,8 @@

         /* Update the client counter on badge. */
         update_client_count();
+
+        addEventListener(MouseEvent.CLICK, mouse_clicked);
     }

     public function proxy_begin():void
@@ -412,6 +419,15 @@
         cur_client_count_tf.text = "";
         for(var i:Number = 0; i < num_proxy_pairs; i++)
             cur_client_count_tf.appendText(".");
+    }
+
+    /* Show a web page with detailed information when the badge is clicked. */
+    private function mouse_clicked(e:MouseEvent):void
+    {
+        try {
+            navigateToURL(new URLRequest(FLASHPROXY_INFO_URL));
+        } catch (err:Error) {
+        }
     }
 }


fixed bug with sortOn() temporary solution when returnSortedIndexArray=true

--- WeaveJS/src/weavejs/util/StandardLib.as
+++ WeaveJS/src/weavejs/util/StandardLib.as
@@ -618,9 +618,9 @@
 		public static function sortOn(array:*, params:*, sortDirections:* = undefined, inPlace:Boolean = true, returnSortedIndexArray:Boolean = false):*
 		{
 			//TODO
-			if (returnSortedIndexArray || !inPlace)
-				return array.concat();
-			return array;
+			if (returnSortedIndexArray)
+				return array.map(function(o:*, i:*, a:*):* { return i; });
+			return inPlace ? array : array.concat();
 		}

 		/**


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

--- frameworks/projects/mobilecomponents/src/spark/styles/metadata/GapStyles.as
+++ frameworks/projects/mobilecomponents/src/spark/styles/metadata/GapStyles.as
@@ -1,4 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-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.
+//
+////////////////////////////////////////////////////////////////////////////////

+/**
+ *  Number of pixels between children in the horizontal direction.
+ *  The default value depends on the component class;
+ *  if not overridden for the class, the default value is 8.
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
 [Style(name="horizontalGap", type="Number", format="Length", inherit="no")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 12934
Author:   rfrishbe@adobe.com
Date:     2009-12-15T01:54:22.402049Z

Log Message:
-----------
Cleaning up some FIXMEs in the code and fixing up some ASDocs.  Also fixing VSlider/HSlider dataTip positioning so that the thumb doesn't have to be in the same coordinate system as the Slider itself.

QE notes: -
Doc notes: -
Bugs: -
Reviewer: Kevin for part of it--otherwise just doc fixes
Tests run: checkintests, mustella Slider
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<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/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
@@ -417,8 +417,8 @@

     /**
      *  If set to true, shows a data tip during user interaction
-     *  containing the current value of the slider. In addition, the skinPart
-     *  dataTipFactory must be defined in the skin in order to
+     *  containing the current value of the slider. In addition, the skinPart,
+     *  dataTip, must be defined in the skin in order to
      *  display a data tip.
      *  @default true
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 9215
Author:   jszeto@adobe.com
Date:     2009-08-11T00:30:21.721484Z

Log Message:
-----------
Event Propagation bug fix

http://bugs.adobe.com/jira/browse/SDK-21044 - Spark Components should use event.preventDefault instead of event.stopPropagation

Since keyboard are now cancellable, the Spark components should use event.preventDefault() / event.isDefaultPrevented()  instead of event.stopPropagation. I updated ButtonBar, RadioButton, and DropDownList to use preventDefault(). Also cleaned up Slider and Spinner to always assume the event is cancellable.

QE notes: Add tests with these components inside of scrollable containers
Doc notes: None
Bugs: SDK-21044
Reviewer: Hans
Tests run: Slider, Spinner, RadioButton, ButtonBar, DropDownList
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
@@ -581,7 +581,6 @@
         // array is returned. Consider reversed HSliders or VSliders.
         var prevValue:Number = this.value;
         var newValue:Number;
-        var stopPropagation:Boolean = false;

         switch (event.keyCode)
         {
@@ -590,7 +589,7 @@
             {
                 newValue = nearestValidValue(pendingValue - stepSize, snapInterval);
                 setValue(newValue);
-                stopPropagation = true;
+                event.preventDefault();
                 break;
             }

@@ -599,38 +598,28 @@
             {
                 newValue = nearestValidValue(pendingValue + stepSize, snapInterval);
                 setValue(newValue);
-                stopPropagation = true;
+                event.preventDefault();
                 break;
             }

             case Keyboard.HOME:
             {
                 value = minimum;
-                stopPropagation = true;
+                event.preventDefault();
                 break;
             }

             case Keyboard.END:
             {
                 value = maximum;
-                stopPropagation = true;
+                event.preventDefault();
                 break;
             }
         }

         if (value != prevValue)
             dispatchEvent(new Event(Event.CHANGE));
-
-        // Flex 4 redispatches scrolling keyboard events with cancelable=true
-        // so typically we will preventDefault (read "cancel") here, rather
-        // than stopping dispatching.
-        if (stopPropagation)
-        {
-            if (event.cancelable)
-                event.preventDefault();
-            else
-                event.stopPropagation();
-        }
+
     }

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


fix shadowMapSize init in PointLight constructor

--- src/aerys/minko/scene/node/light/PointLight.as
+++ src/aerys/minko/scene/node/light/PointLight.as
@@ -27,8 +27,6 @@
 		public static const LIGHT_TYPE : uint = 2;

 		private static const TMP_VECTOR		: Vector4 = new Vector4();
-
-		private var _shadowMapSize	: uint;

 		public function get diffuse() : Number
 		{
@@ -132,8 +130,6 @@
 								   shadowZFar			: Number	= 1000.,
                                    shadowBias           : uint      = 1. / 256. / 256.)
 		{
-			_shadowMapSize	= shadowMapSize;
-
 			super(
 				new PointLightController(),
 				LIGHT_TYPE,
@@ -146,6 +142,7 @@
 			this.shininess				= shininess;
 			this.attenuationDistance	= attenuationDistance;
 			this.shadowCastingType		= shadowCastingType;
+            this.shadowMapSize          = shadowMapSize;
 			this.shadowZNear			= shadowZNear;
 			this.shadowZFar		    	= shadowZFar;
             this.shadowBias             = shadowBias;


organizing imports

organizing imports

Change-Id: Ie6d4df91f21c4033cc4b393eb73519ee6591a128

--- WeaveData/src/weave/data/DataSources/TransposedDataSource.as
+++ WeaveData/src/weave/data/DataSources/TransposedDataSource.as
@@ -19,11 +19,8 @@

 package weave.data.DataSources
 {
-	import avmplus.describeType;
-
 	import weave.api.WeaveAPI;
 	import weave.api.core.ILinkableHashMap;
-	import weave.api.core.ILinkableObject;
 	import weave.api.data.ColumnMetadata;
 	import weave.api.data.DataTypes;
 	import weave.api.data.IAttributeColumn;
@@ -41,7 +38,6 @@
 	import weave.data.AttributeColumns.ProxyColumn;
 	import weave.data.ColumnReferences.HierarchyColumnReference;
 	import weave.data.KeySets.FilteredKeySet;
-	import weave.utils.AsyncSort;
 	import weave.utils.ColumnUtils;
 	import weave.utils.HierarchyUtils;
 	import weave.utils.VectorUtils;
@@ -213,13 +209,11 @@
 		}
 	}
 }
-import weave.api.core.ILinkableObject;
 import weave.api.data.IFilteredKeySet;
 import weave.api.detectLinkableObjectChange;
 import weave.api.newLinkableChild;
 import weave.api.registerLinkableChild;
 import weave.data.KeySets.FilteredKeySet;
-import weave.utils.AsyncSort;
 import weave.utils.VectorUtils;

 internal class InternalData


Change 20090302-bargull-e6N by bargull@dell--p4--2-53 on 2009-03-02 17:37:08
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: add invisible bgcolor for views without bgcolor

New Features:

Bugs Fixed: LPP-7842 (SWF9: context-menu not shown for view without bgcolor/content)

Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
If bgcolor isn't set, use an invisible background colour like in swf8. This forces the flash sprite to resize itself to match background fill size.

Tests:
testcase at bugreport

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@13124 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
@@ -172,7 +172,8 @@
               this.graphics.clear();
           } else {
               this.graphics.clear();
-              this.graphics.beginFill(this.bgcolor);
+              var alpha:Number = this.__bgcolorhidden ? 0 : 1;
+              this.graphics.beginFill(this.bgcolor, alpha);
               this.graphics.drawRect(0, 0, this.lzwidth, this.lzheight);
               this.graphics.endFill();
           }
@@ -925,14 +926,21 @@
                                                              o.bb,
                                                              o.ab ? o.ab : 0);
       }
-
+
       /** setBGColor( String/Number:color )
           o Sets the background color of the sprite
           o Can be a number (0xff00ff):void or a string ('#ff00ff'):void
       */
       public function setBGColor( c:* ):void {
-          if (this.bgcolor == c) return;
-          this.bgcolor = c;
+          if (this.bgcolor == c && ! this.__bgcolorhidden) return;
+          if (c != null || this.__contextmenu == null) {
+              this.__bgcolorhidden = false;
+              this.bgcolor = c;
+          } else {
+              // create an invisible background
+              this.__bgcolorhidden = true;
+              this.bgcolor = 0xffffff;
+          }
           draw();
       }

@@ -1373,6 +1381,7 @@
       }

       var __contextmenu;
+      var __bgcolorhidden:Boolean = false;

       /* LzSprite.setContextMenu
        * Install menu items for the right-mouse-button
@@ -1388,7 +1397,12 @@
               // TODO [hqm 2008-04] make this do the more complex stuff that swf8 LzSprite does now,
               // where it checks for a resource or bgcolor sprite, in order to make the clickable region
               // match what the user expects.
-
+              if (this.bgcolor == null) {
+                  // if not present, create an invisible background
+                  this.__bgcolorhidden = true;
+                  this.bgcolor = 0xffffff;
+                  this.draw();
+              }

               // "contextMenu" is a swf9 property on flash.display.Sprite
               this.contextMenu = cmenu;


updated function names in VisToolGroup

updated function names in VisToolGroup

--- WeaveUI/src/weave/utils/VisToolGroup.as
+++ WeaveUI/src/weave/utils/VisToolGroup.as
@@ -24,7 +24,9 @@
 	import weave.api.data.IKeySet;
 	import weave.api.registerLinkableChild;
 	import weave.core.LinkableDynamicObject;
+	import weave.data.AttributeColumns.BinnedColumn;
 	import weave.data.AttributeColumns.ColorColumn;
+	import weave.data.AttributeColumns.FilteredColumn;

 	/**
 	 * This is an encapsulation of a set of references to global objects used by a visualization tool.
@@ -39,9 +41,11 @@
 		public const globalSelectionKeySet:LinkableDynamicObject = registerLinkableChild(this, new LinkableDynamicObject(IKeySet));
 		public const globalSubsetKeyFilter:LinkableDynamicObject = registerLinkableChild(this, new LinkableDynamicObject(IKeyFilter));

-		public function get colorColumn():ColorColumn { return globalColorColumn.internalObject as ColorColumn; }
-		public function get probe():IKeySet { return globalProbeKeySet.internalObject as IKeySet; }
-		public function get selection():IKeySet { return globalSelectionKeySet.internalObject as IKeySet; }
-		public function get subset():IKeyFilter { return globalSubsetKeyFilter.internalObject as IKeyFilter; }
+		public function getColorColumn():ColorColumn { return globalColorColumn.internalObject as ColorColumn; }
+		public function getColorBinColumn():BinnedColumn { return getColorColumn().internalColumn as BinnedColumn; }
+		public function getColorDataColumn():FilteredColumn { return getColorBinColumn().internalColumn as FilteredColumn; }
+		public function getProbe():IKeySet { return globalProbeKeySet.internalObject as IKeySet; }
+		public function getSelection():IKeySet { return globalSelectionKeySet.internalObject as IKeySet; }
+		public function getSubset():IKeyFilter { return globalSubsetKeyFilter.internalObject as IKeyFilter; }
 	}
 }


AVCC works properly again.

AVCC works properly again.

--- HLSPlugin/src/com/kaltura/hls/m2ts/M2TSToFLVConverter.as
+++ HLSPlugin/src/com/kaltura/hls/m2ts/M2TSToFLVConverter.as
@@ -490,7 +490,7 @@
 			if( pts < 0 || dts < 0 || 0 == _avcPacket.length)
 				return;

-			if(_sendAVCC && !neverAvcc)
+			if(_sendAVCC /* && !neverAvcc */)
 			{
 				neverAvcc = true;


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

--- frameworks/projects/advancedgrids/src/mx/collections/IGroupingCollection2.as
+++ frameworks/projects/advancedgrids/src/mx/collections/IGroupingCollection2.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.collections
 {


Integer was getting envious of Short's MIN/MAX_VALUE constants, so let's appease it.

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

--- src/as/com/threerings/util/Integer.as
+++ src/as/com/threerings/util/Integer.as
@@ -36,6 +36,12 @@
 public final class Integer
     implements Hashable, Boxed, Streamable
 {
+    /** The minimum possible int value. */
+    public static const MIN_VALUE :int = -Math.pow(2, 31);
+
+    /** The maximum possible int value. */
+    public static const MAX_VALUE :int = (Math.pow(2, 31) - 1);
+
     public static function valueOf (val :int) :Integer
     {
         return new Integer(val);


Reverted 'memory-leak-fix' in DTNavMesh because data is deallocated during DTNavMesh::free call.

--- as3_lib/src/recastnavigation/detour/navmesh/DTNavMesh.as
+++ as3_lib/src/recastnavigation/detour/navmesh/DTNavMesh.as
@@ -19,15 +19,11 @@
         /** The maximum number of user defined area ids. */
         public static const DT_MAX_AREAS:int = 64;

-        private var _data_ptr:int = -1;
-        private var _dataSize:int;
-
         /** Initializes the navigation mesh for single tile use. */
         public function init(data:Vector.<int>, flags:int):int
         {
-            _data_ptr = mallocInt8Vector(data);
-            _dataSize = data.length;
-            var result:int = internal_dtNavMesh_init(ptr, _data_ptr, _dataSize, flags);
+            var data_ptr:int = mallocInt8Vector(data);
+            var result:int = internal_dtNavMesh_init(ptr, data_ptr, data.length, flags);
             return result;
         }

@@ -54,9 +50,6 @@

         public override function free():void
         {
-            if (_data_ptr != -1)
-                CModule.free(_data_ptr);
-            _dataSize = 0;
             internal_dtFreeNavMesh(ptr);
             ptr = 0;
         }


REPRISE: attach:// modfied by marc
works now with library assets from loaded swf´s

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

--- src/reprise/external/ImageResource.as
+++ src/reprise/external/ImageResource.as
@@ -100,14 +100,10 @@
 	            {
 	                var symbolClass : Class = getDefinitionByName(symbolId) as Class;
 					m_resource = new symbolClass() as DisplayObject;
-					m_resource.addEventListener(Event.COMPLETE,
-						function(event : Event) : void
-					{
-						m_httpStatus = new HTTPStatus(200, m_url);
-						onData(true);
-					}, false, 0, true);
+					m_httpStatus = new HTTPStatus(200, m_url);
+					onData(true);
 	            }
-				catch (e_ : Error)
+				catch (e : Error)
 				{
 					log('w Unable to use attach:// procotol! Symbol ' + symbolId + ' not found!');
 					onData(false);


Backup/restore popup opens when clicking on Data Cleansing item in home page

--- collect-client/src/main/flex/org/openforis/collect/presenter/HomePresenter.as
+++ collect-client/src/main/flex/org/openforis/collect/presenter/HomePresenter.as
@@ -96,6 +96,7 @@
 					break;
 				case DATA_CLEANSING_MENU_ITEM:
 					navigateToURL(new URLRequest(ApplicationConstants.DATA_CLEANSING_URL), "_self");
+					break;
 				case BACKUP_RESTORE_MENU_ITEM:
 					PopUpUtil.createPopUp(BackupRestorePopUp, true);
 					break;