Transferred from the Adobe Open Source Subversion Repository

Revision: 20684
Author:   rfrishbe@adobe.com
Date:     2011-03-08T19:14:07.872274Z

Log Message:
-----------
ASDoc changes: some cleanups and clarifying mobile vs. spark where appropriate

QE notes: -
Doc notes:
Bugs: SDK-29845
Reviewer: Carol F
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.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/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -140,8 +140,6 @@
 /**
  *  @copy spark.components.supportClasses.GroupBase#style:downColor
  *
- *  @default undefined
- *
  *  @langversion 3.0
  *  @playerversion Flash 10.1
  *  @playerversion AIR 2.5


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

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

 package spark.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8487
Author:   smgilson@adobe.com
Date:     2009-07-09T18:57:21.985536Z

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

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

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

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

--- frameworks/projects/spark/src/spark/layouts/BasicLayout.as
+++ frameworks/projects/spark/src/spark/layouts/BasicLayout.as
@@ -106,7 +106,7 @@
  *  coordinates of the bottom-right corner of all the layout elements.

  *
  *  @mxml
- *
The <BasicLayout> tag inherits all of the tag
+ *
The <s:BasicLayout> tag inherits all of the tag
  *  attributes of its superclass and adds no additional tag attributes:

  *
  *


Improved wire pathing

Improved wire pathing

--- src/Components/Wire.as
+++ src/Components/Wire.as
@@ -119,9 +119,12 @@
 					return null;
 				//try to salvage what you can of the path (find the closest node checked)
 				curNode = checked[0];
-				for (i = 1; i < checked.length; i++)
-					if (checked[i].totalDist < curNode.totalDist)
+				for (i = 1; i < checked.length; i++) {
+					var curDist:int = curNode.totalDist;
+					var checkedDist:int = checked[i].totalDist;
+					if (checkedDist < curDist || (checkedDist == curDist && checked[i].distFromStart < curNode.distFromStart))
 						curNode = checked[i];
+				}
 			}

 			var reversedPath:Vector.<Point> = new Vector.<Point>;


fixed bug incorrectly loading defaults, making it potentially save incorrect information regarding note sharing permissions

--- flexEditor/src/org/arisgames/editor/view/CreateOrOpenGameSelectorView.as
+++ flexEditor/src/org/arisgames/editor/view/CreateOrOpenGameSelectorView.as
@@ -98,8 +98,8 @@
 			g.pcMediaId = obj.result.data.list.getItemAt(j).pc_media_id;
 			g.introNodeId = obj.result.data.list.getItemAt(j).on_launch_node_id;
 			g.completeNodeId = obj.result.data.list.getItemAt(j).game_complete_node_id;
-			g.noteShareToMap = obj.result.data.list.getItemAt(j).allow_share_to_map;
-			g.noteShareToBook = obj.result.data.list.getItemAt(j).allow_share_to_book;
+			g.noteShareToMap = obj.result.data.list.getItemAt(j).allow_share_note_to_map;
+			g.noteShareToBook = obj.result.data.list.getItemAt(j).allow_share_note_to_book;
 			g.playerCreateComments = obj.result.data.list.getItemAt(j).allow_note_comments;
 			g.playerCreateTags = obj.result.data.list.getItemAt(j).allow_player_tags;
 			g.isLocational = obj.result.data.list.getItemAt(j).is_locational;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19847
Author:   tkraikit@adobe.com
Date:     2011-01-20T22:34:22.112386Z

Log Message:
-----------
bug29179: svn 19813 uncovered UIComponent.styleChanged() overrides which failed to call super.styleChanged(), resulting in a layout error in ColorPicker. Fix applied there and in two other locations lacking the call.

QE notes: none
Doc notes: none
Bugs: 29179
Reviewer: rfrishbe
Tests run: checkintests, mustella
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/colorPickerClasses/SwatchPanel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/skins/halo/HaloBorder.as</path>

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

--- frameworks/projects/mx/src/mx/controls/colorPickerClasses/SwatchPanel.as
+++ frameworks/projects/mx/src/mx/controls/colorPickerClasses/SwatchPanel.as
@@ -1125,6 +1125,8 @@
      */
     override public function styleChanged(styleProp:String):void
     {
+        super.styleChanged(styleProp);
+
         if (!initializing)
             refresh();
     }


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

--- frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as
@@ -0,0 +1,394 @@
+/*************************************************************************
+ *
+ * ADOBE CONFIDENTIAL
+ * __________________
+ *
+ *  [2002] - [2007] Adobe Systems Incorporated
+ *  All Rights Reserved.
+ *
+ * NOTICE:  All information contained herein is, and remains
+ * the property of Adobe Systems Incorporated and its suppliers,
+ * if any.  The intellectual and technical concepts contained
+ * herein are proprietary to Adobe Systems Incorporated
+ * and its suppliers and may be covered by U.S. and Foreign Patents,
+ * patents in process, and are protected by trade secret or copyright law.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained
+ * from Adobe Systems Incorporated.
+ */
+package mx.messaging.channels
+{
+
+import flash.events.Event;
+import flash.events.HTTPStatusEvent;
+import flash.events.IOErrorEvent;
+import flash.events.SecurityErrorEvent;
+import flash.events.StatusEvent;
+import flash.utils.ByteArray;
+
+import mx.core.mx_internal;
+import mx.logging.Log;
+import mx.messaging.FlexClient;
+import mx.messaging.config.ConfigMap;
+import mx.messaging.config.ServerConfig;
+import mx.messaging.events.ChannelFaultEvent;
+import mx.messaging.messages.AbstractMessage;
+import mx.messaging.messages.ErrorMessage;
+import mx.messaging.messages.IMessage;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
+
+use namespace mx_internal;
+
+[ResourceBundle("messaging")]
+
+/**
+ *  The StreamingAMFChannel class provides support for messaging and
+ *  offers a different push model than the base AMFChannel. Rather than
+ *  polling for data from the server, the streaming channel opens an internal
+ *  HTTP connection to the server that is held open to allow the server to
+ *  stream data down to the client with no poll overhead.
+ *
+ *

+ *  Messages sent by this channel to the server are sent using a NetConnection
+ *  which uses an HTTP connection internally for the duration of the operation.
+ *  Once the message is sent and an acknowledgement or fault is returned the HTTP connection
+ *  used by NetConnection is released by the channel. These client-to-server messages are
+ *  not sent over the streaming HTTP connection that the channel holds open to receive
+ *  server pushed data.
+ *

+ *
+ *

+ *  Although this class extends the base AMFChannel to inherit the regular AMF
+ *  handling, it does not support polling.
+ *

+ */
+public class StreamingAMFChannel extends AMFChannel
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Creates an new StreamingAMFChannel instance.
+     *
+	 *  @param id The id of this Channel.
+	 *
+	 *  @param uri The uri for this Channel.
+     */
+    public function StreamingAMFChannel(id:String = null, uri:String = null)
+    {
+        super(id, uri);
+
+        // Disable polling.
+        internalPollingEnabled = false;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+  	/**
+  	 * Helper class used by the channel to establish a streaming HTTP connection
+  	 * with the server.
+  	 */
+	private var streamingConnectionHandler:StreamingConnectionHandler;
+
+    /**
+     *  @private
+     */
+    private var resourceManager:IResourceManager =
+									ResourceManager.getInstance();
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  pollingEnabled
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set pollingEnabled(value:Boolean):void
+    {
+		var message:String = resourceManager.getString(
+			"messaging", "pollingNotSupportedAMF");
+        throw new Error(message);
+    }
+
+    //----------------------------------
+	//  pollingInterval
+	//----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function set pollingInterval(value:Number):void
+    {
+		var message:String = resourceManager.getString(
+			"messaging", "pollingNotSupportedAMF");
+        throw new Error(message);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Overridden Public Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Polling is not supported by this channel.
+     */
+    override public function poll():void
+    {
+		var message:String = resourceManager.getString(
+			"messaging", "pollingNotSupportedAMF");
+        throw new Error(message);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Overridden Protected Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Closes the streaming connection before redispatching the fault event.
+     *
+     *  @param event The ChannelFaultEvent.
+     */
+	override protected function connectFailed(event:ChannelFaultEvent):void
+	{
+		if (streamingConnectionHandler != null)
+			streamingConnectionHandler.closeStreamingConnection();
+
+        super.connectFailed(event);
+	}
+
+    /**
+     *  @private
+     *  Closes the streaming connection before disconnecting.
+     */
+    override protected function internalDisconnect(rejected:Boolean = false):void
+    {
+		if (streamingConnectionHandler != null)
+			streamingConnectionHandler.closeStreamingConnection();
+
+        super.internalDisconnect(rejected);
+    }
+
+    /**
+     *  @private
+     *  This method will be called if the ping message sent to test connectivity
+     *  to the server during the connection attempt succeeds.
+     *  Before triggering connect success handling the streaming channel must set
+     *  up its streaming connection with the server.
+     */
+    override protected function resultHandler(msg:IMessage):void
+    {
+        // Update the ServerConfig with dynamic configuration
+        if (msg != null)
+        {
+			ServerConfig.updateServerConfigData(msg.body as ConfigMap, endpoint);
+
+			// Set the server assigned FlexClient Id.
+            if (FlexClient.getInstance().id == null && msg.headers[AbstractMessage.FLEX_CLIENT_ID_HEADER] != null)
+                FlexClient.getInstance().id = msg.headers[AbstractMessage.FLEX_CLIENT_ID_HEADER];
+        }
+        if (credentials != null && !(msg is ErrorMessage))
+            setAuthenticated(true);
+
+        if (streamingConnectionHandler == null)
+        {
+        	streamingConnectionHandler = new StreamingAMFConnectionHandler(this, _log);
+            streamingConnectionHandler.addEventListener(Event.OPEN, streamOpenHandler);
+            streamingConnectionHandler.addEventListener(Event.COMPLETE, streamCompleteHandler);
+            streamingConnectionHandler.addEventListener(HTTPStatusEvent.HTTP_STATUS, streamHttpStatusHandler);
+            streamingConnectionHandler.addEventListener(IOErrorEvent.IO_ERROR, streamIoErrorHandler);
+            streamingConnectionHandler.addEventListener(SecurityErrorEvent.SECURITY_ERROR, streamSecurityErrorHandler);
+            streamingConnectionHandler.addEventListener(StatusEvent.STATUS, streamStatusHandler);
+        }
+        streamingConnectionHandler.openStreamingConnection();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Private Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  If the streaming connection receives an open event the channel is setup
+     *  and gets ready for messaging.
+     *
+     *  @param event The OPEN Event.
+     */
+    private function streamOpenHandler(event:Event):void
+    {
+       connectSuccess();
+    }
+
+    /**
+     *  A complete event indicates that the streaming connection has been closed by the server.
+     *  This is a no-op if the channel is disconnected on the client, otherwise notifies the client
+     *  channel that it has disconnected.
+     *
+     *  @param event The COMPLETE Event.
+     */
+    private function streamCompleteHandler(event:Event):void
+    {
+        if (connected) // The server has closed the connection but the client currently believes it should be connected.
+        {
+            // Dispatch a channel fault event.
+            var faultEvent:ChannelFaultEvent = ChannelFaultEvent.createEvent(this, false, "Channel.Stream.Failed", "error", "Remote endpoint has closed the streaming connection.");
+            faultEvent.rootCause = event;
+            dispatchEvent(faultEvent);
+            // And disconnect the channel.
+            internalDisconnect();
+        }
+    }
+
+    /**
+     *  Handle HTTP status events dispatched by the streaming connection.
+     *
+     *  @param event The HTTPStatusEvent.
+     */
+    private function streamHttpStatusHandler(event:HTTPStatusEvent):void
+    {
+    	// No-op because most of the times, HTTP status is zero.
+        // See ioErrorHandler.
+    }
+
+    /**
+     *  Handle IO error events dispatched by the streaming connection.
+     *
+     *  @param event The IOErrorEvent.
+     */
+    private function streamIoErrorHandler(event:IOErrorEvent):void
+    {
+        var faultEvent:ChannelFaultEvent;
+        if (connected)
+        {
+            // Dispatch a channel fault event.
+            faultEvent = ChannelFaultEvent.createEvent(this, false, "Channel.Stream.Failed", "error", " url: '" + endpoint + "'");
+            faultEvent.rootCause = event;
+            dispatchEvent(faultEvent);
+            // And disconnect the channel.
+            internalDisconnect();
+        }
+        else
+        {
+            // Fault the current connect attempt.
+            faultEvent = ChannelFaultEvent.createEvent(this, false, "Channel.Stream.Failed", "error", " url: '" + endpoint + "'");
+            faultEvent.rootCause = event;
+            connectFailed(faultEvent);
+        }
+    }
+
+    /**
+     *  Handle security error events dispatched by the streaming connection.
+     *
+     *  @param event The SecurityErrorEvent.
+     */
+    private function streamSecurityErrorHandler(event:SecurityErrorEvent):void
+    {
+		// Just log as we'll never reach this handler because the prior ping will trigger
+        // a security error before we try to establish the streaming connection.
+    	if (Log.isDebug())
+    		_log.debug("'{0}' channel encountered a security error: {1}", id, event.text);
+    }
+
+    /**
+     *  Handle status events dispatched by the streaming connection.
+     *
+     *  @param event The StatusEvent.
+     */
+    private function streamStatusHandler(event:StatusEvent):void
+    {
+        // Only a disconnect status event is currently handled.
+        if (event.code == StreamingConnectionHandler.DISCONNECT_CODE)
+        {
+            streamingConnectionHandler.closeStreamingConnection();
+            disconnectSuccess(true /* rejected */);
+        }
+    }
+}
+
+}
+
+//------------------------------------------------------------------------------
+//
+// Private Classes
+//
+//------------------------------------------------------------------------------
+
+import flash.net.ObjectEncoding;
+import flash.utils.ByteArray;
+
+import mx.logging.ILogger;
+import mx.logging.Log;
+import mx.messaging.Channel;
+import mx.messaging.channels.StreamingConnectionHandler;
+import mx.messaging.messages.IMessage;
+
+/**
+ *  A helper class that is used by the streaming channels to open an internal
+ *  HTTP connection to the server that is held open to allow the server to
+ *  stream data down to the client with no poll overhead.
+ */
+class StreamingAMFConnectionHandler extends StreamingConnectionHandler
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Creates an new StreamingAMFConnectionHandler instance.
+     *
+	 *  @param channel The Channel that uses this class.
+	 *  @param log Reference to the logger for the associated Channel.
+     */
+    public function StreamingAMFConnectionHandler(channel:Channel, log:ILogger)
+    {
+		super(channel, log);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Protected Methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Used by the streamProgressHandler to read an AMF encoded message.
+	 */
+    override protected function readMessage():IMessage
+    {
+    	var message:IMessage;
+		chunkBuffer.position = dataOffset - 1;
+		var messageBytes:ByteArray = new ByteArray();
+		messageBytes.objectEncoding = ObjectEncoding.AMF3;
+		try
+		{
+			chunkBuffer.readBytes(messageBytes, 0, dataBytesToRead);
+			message = IMessage(messageBytes.readObject());
+		}
+    	catch(error:Error)
+    	{
+			if (Log.isError())
+	        	_log.error("'{0}' channel encountered an error while reading a message from the streaming connection: {1}", channel.id, error.message);
+    	}
+		return message;
+    }
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
@@ -9,18 +9,18 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.components
+package spark.components
 {

 import mx.collections.IList;
-import mx.components.DataGroup;
-import mx.components.baseClasses.FxContainerBase;
+import spark.components.DataGroup;
+import spark.components.supportClasses.SkinnableContainerBase;
 import mx.core.IFactory;
-import mx.core.IViewport;
+import spark.core.IViewport;
 import mx.events.FlexEvent;
 import mx.events.PropertyChangeEvent;
-import mx.events.RendererExistenceEvent;
-import mx.layout.LayoutBase;
+import spark.events.RendererExistenceEvent;
+import spark.layout.supportClasses.LayoutBase;
 import mx.managers.IFocusManagerContainer;
 import mx.utils.BitFlagUtil;

@@ -35,7 +35,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Event(name="rendererAdd", type="mx.events.RendererExistenceEvent")]
+[Event(name="rendererAdd", type="spark.events.RendererExistenceEvent")]

 /**
  *  Dispatched when a renderer is removed from the content holder.
@@ -48,7 +48,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-[Event(name="rendererRemove", type="mx.events.RendererExistenceEvent")]
+[Event(name="rendererRemove", type="spark.events.RendererExistenceEvent")]

 include "../styles/metadata/BasicTextLayoutFormatStyles.as"

@@ -64,20 +64,20 @@

 [DefaultProperty("dataProvider")]

-[IconFile("FxDataContainer.png")]
+[IconFile("SkinnableDataContainer.png")]

 /**
- *  The FxDataContainer class is the base class for all skinnable components that have
+ *  The SkinnableDataContainer class is the base class for all skinnable components that have
  *  data content.
  *
- *  @see FxContainer
+ *  @see SkinnableContainer
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class FxDataContainer extends FxContainerBase implements IViewport
+public class SkinnableDataContainer extends SkinnableContainerBase implements IViewport
 {
     include "../core/Version.as";

@@ -146,7 +146,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function FxDataContainer()
+    public function SkinnableDataContainer()
     {
         super();

@@ -175,15 +175,15 @@
     /**
      *  @private
      *  Several properties are proxied to dataGroup.  However, when dataGroup
-     *  is not around, we need to store values set on FxDataContainer.  This object
+     *  is not around, we need to store values set on SkinnableDataContainer.  This object
      *  stores those values.  If dataGroup is around, the values are stored
      *  on the dataGroup directly.  However, we need to know what values
-     *  have been set by the developer on the FxDataContainer (versus set on
+     *  have been set by the developer on the SkinnableDataContainer (versus set on
      *  the dataGroup or defaults of the dataGroup) as those are values
      *  we want to carry around if the dataGroup changes (via a new skin).
      *  In order to store this info effeciently, dataGroupProperties becomes
      *  a uint to store a series of BitFlags.  These bits represent whether a
-     *  property has been explicitely set on this FxDataContainer.  When the
+     *  property has been explicitely set on this SkinnableDataContainer.  When the
      *  dataGroup is not around, dataGroupProperties is a typeless
      *  object to store these proxied properties.  When dataGroup is around,
      *  dataGroupProperties stores booleans as to whether these properties


Transferred from the Adobe Open Source Subversion Repository

Revision: 16984
Author:   hmuller@adobe.com
Date:     2010-07-20T22:57:37.200345Z

Log Message:
-----------
Clear item renderers' layout bounds at discard time to avoid problems with text component's caching their preferred width.

Do not rely on the grid's width at measure time when computing typical column widths.

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

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -96,7 +96,7 @@
         if (!grid)
             return;

-        // If the hoverIndicator is visible then we're going to have to fixup it's location
+        // If the hoverIndicator is visible then we're going to have to fixup its location
         // at updateDisplayList() time.

         if ((grid.hoverRowIndex != -1) || (grid.hoverColumnIndex != -1))
@@ -107,7 +107,7 @@
             invalidateHoverLocation(dx, dy);
         }

-        super.scrollPositionChanged();
+        super.scrollPositionChanged();  // sets grid.scrollRect

         // Only invalidate if we're clipping and scrollR extends outside validBounds

@@ -133,17 +133,13 @@
         if (!grid)
             return;

-        const width:Number = grid.width;
-        const height:Number = grid.height;
-        if ((width > 0) && (height > 0))
-            updateGridDimensions(horizontalScrollPosition, verticalScrollPosition, width, height);
+        updateGridDimensions(horizontalScrollPosition, verticalScrollPosition, NaN, NaN);

         var measuredWidth:Number = gridDimensions.getContentWidth(grid.requestedColumnCount);
         var measuredHeight:Number = gridDimensions.getContentHeight(grid.requestedRowCount);
 		var measuredMinWidth:Number = gridDimensions.getContentHeight(grid.requestedMinColumnCount);
 		var measuredMinHeight:Number = gridDimensions.getContentHeight(grid.requestedMinRowCount);

-
         // Use Math.ceil() to make sure that if the content partially occupies
         // the last pixel, we'll count it as if the whole pixel is occupied.

@@ -389,7 +385,7 @@

         var indices:Vector.<int> = null;  // return value

-		for (var columnIndex:int = startIndex; (width > 0) && (columnIndex < columnCount); columnIndex++)
+		for (var columnIndex:int = startIndex; (isNaN(width) || (width > 0)) && (columnIndex < columnCount); columnIndex++)
 		{
             var cellHeight:Number = gridDimensions.getTypicalCellHeight(columnIndex);
 			var cellWidth:Number = gridDimensions.getTypicalCellWidth(columnIndex);
@@ -398,7 +394,6 @@
             if (!isNaN(column.width))
             {
                 cellWidth = column.width;
-                // explicit width so set it in GD
                 gridDimensions.setColumnWidth(columnIndex, cellWidth);
             }

@@ -421,10 +416,13 @@
                 freeGridElement(renderer);
             }

-			if (columnIndex == startIndex)
-				width -= startCellX + cellWidth - startX;
-			else
-				width -= cellWidth + columnGap;
+            if (!isNaN(width))
+            {
+    			if (columnIndex == startIndex)
+    				width -= startCellX + cellWidth - startX;
+    			else
+    				width -= cellWidth + columnGap;
+            }
 		}

         return indices;
@@ -786,12 +784,6 @@
     private function uninitializeItemRenderer(renderer:IVisualElement):void
     {
         renderer.visible = false;
-
-        // TBD: should this be done later, like right before the renderer is validated?
-        // Reset back to (0,0), otherwise when the element is reused
-        // it will be validated at its last layout size which causes
-        // problems with text reflow.
-        renderer.setLayoutBoundsSize(0, 0, false);

         if (grid.gridOwner)
             grid.gridOwner.discardItemRenderer(renderer, true);
@@ -1513,6 +1505,11 @@
             return false;
         element.visible = false;

+        // Reset back to (0,0), otherwise when the element is reused
+        // it will be validated at its last layout size which causes
+        // problems with text reflow.
+        element.setLayoutBoundsSize(0, 0, false);
+
         const factory:IFactory = elementToFactoryMap[element];
         if (!factory)
             return false;


Transferred from the Adobe Open Source Subversion Repository

Revision: 21681
Author:   hmuller@adobe.com
Date:     2011-07-21T23:00:03.466976Z

Log Message:
-----------
Bug fixes.

QE notes: 33 bitmap failures expected due to the 29556 changes, all of the affected tests should have been excluded
Doc notes:
Bugs: SDK-29556, SDK-30734
Reviewer: Carol
Tests run: checkin, mustella
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -1630,7 +1630,7 @@
             return;

         const x:Number = bounds.x;
-        const width:Number = bounds.width;
+        const width:Number = Math.max(bounds.width, visibleGridBounds.right);
         const y:Number = bounds.bottom; // TODO (klin): should center on gap here.
         layoutGridElement(separator, x, y, width, height);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3892
Author:   egeorgie@adobe.com
Date:     2008-10-24T23:33:52.238868Z

Log Message:
-----------
Add constraint properties and unify IVisualItem, UIComponent, GraphicElement, change percentSize to percentWidth, percentHeight in ILayoutItem. Remove IGraphicElementHost and GraphicElementHostImpl. Change GraphicElement constraint properties to take in Object instead of Number to enable advanced constraints later on.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Ryan
tests: checkintests, Mustella (canvas, gumbo layout)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<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/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate3D.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/flex4/src/mx/layout/ILayoutItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElementHostImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualItem.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/IGraphicElementHost.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFDO.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/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
@@ -32,12 +32,12 @@

     internal static function hasPercentWidth(layoutItem:ILayoutItem):Boolean
     {
-        return !isNaN( layoutItem.percentSize.x );
+        return !isNaN( layoutItem.percentWidth );
     }

     internal static function hasPercentHeight(layoutItem:ILayoutItem):Boolean
     {
-        return !isNaN( layoutItem.percentSize.y );
+        return !isNaN( layoutItem.percentHeight );
     }

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


fixed null pointer error and backwards compatibility bug.

Change-Id: I88db07f467a2c0689988f2c43c6ca103bdaef247

--- WeaveData/src/weave/data/DataSources/CSVDataSource.as
+++ WeaveData/src/weave/data/DataSources/CSVDataSource.as
@@ -498,6 +498,8 @@
 					for (var i:int = 0; i < columnIds.length; i++)
 					{
 						var meta:Object = getColumnMetadata(columnIds[i]);
+						if (!meta)
+							continue;
 						var found:int = 0;
 						for (var key:String in metadata)
 						{
@@ -658,6 +660,10 @@
 		// backwards compatibility
 		[Deprecated(replacement="csvData")] public function set csvDataString(value:String):void { setCSVDataString(value); }
 		[Deprecated(replacement="getColumnById")] public function getColumnByName(name:String):IAttributeColumn { return getColumnById(name); }
-		[Deprecated(replacement="metadata")] public function set attributeHierarchy(state:Object):void { metadata.setSessionState(state); }
+		[Deprecated(replacement="metadata")] public function set attributeHierarchy(state:Object):void
+		{
+			if (LinkableXML.couldBeXML(state))
+				metadata.setSessionState(state);
+		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4655
Author:   gosmith@adobe.com
Date:     2009-01-24T01:28:05.282830Z

Log Message:
-----------
Moved the new UITLFTextField class (which makes it possible to use TLF in Halo components) from framework.swc to a new SWC, framework_textLayout.swc.

The reason for this involves how RSLs work. Its presence in the framework RSL meant that, even if a Halo app didn't use UITLFTextField, the TLF RSLs had to be loaded first in order to avoid VerifyErrors. Since we don't want to load TLF for Halo apps that don't use it, we had to segregate UITLFTextField from the Halo framework.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/build.xml</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/FrameworkTextLayoutClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/Version.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/build.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework_textLayout/build.xml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITLFTextField.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework_textLayout</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core</path>

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

--- frameworks/projects/framework/src/FrameworkClasses.as
+++ frameworks/projects/framework/src/FrameworkClasses.as
@@ -55,7 +55,6 @@
 	import mx.core.SimpleApplication; SimpleApplication;
 	import mx.core.SoundAsset; SoundAsset;
 	import mx.core.TextFieldAsset; TextFieldAsset;
-	import mx.core.UITLFTextField; UITLFTextField;
 	import mx.effects.easing.Back; Back;
 	import mx.effects.easing.Bounce; Bounce;
 	import mx.effects.easing.Circular; Circular;


Transferred from the Adobe Open Source Subversion Repository

Revision: 9399
Author:   aharui@adobe.com
Date:     2009-08-19T20:39:10.836192Z

Log Message:
-----------
Check in prototypes of ControlBars in Panel and Application, Spark Containers in Halo Navigators, Halo ViewStack in Spark ButtonBar.  APIs should match spec but are subject to change from PARB.  Skins are subject to tweaking after XD review

QE Notes: The following tests will fail and need updating:
gumbo/containers/Panel/Properties/Panel_Properties_position Panel_Properties_rotate
apollo/spark/components/Window/properties/window_properties_titleIcon_tests titleIcon_test8

Doc Notes: None
Bugs: None
Reviewer: Darrell, Glenn, Ryan
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/Application, gumbo/components/ButtonBar, gumbo/containers/Panel, apollo/gumbo/spark/Window, containers/ViewStack, containers/Accordion,

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/SparkChromeWindowedApplicationSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NavigatorChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.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/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.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/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.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/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</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/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatorContent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ApplicationSkin.mxml</path>

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

--- frameworks/projects/mx/src/mx/containers/Accordion.as
+++ frameworks/projects/mx/src/mx/containers/Accordion.as
@@ -13,14 +13,13 @@
 {

 import flash.display.DisplayObject;
-import flash.display.DisplayObjectContainer;
 import flash.events.Event;
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
 import flash.geom.Rectangle;
 import flash.ui.Keyboard;
-import flash.utils.getTimer;
+
 import mx.automation.IAutomationObject;
 import mx.containers.accordionClasses.AccordionHeader;
 import mx.controls.Button;
@@ -31,10 +30,10 @@
 import mx.core.EdgeMetrics;
 import mx.core.FlexVersion;
 import mx.core.IDataRenderer;
+import mx.core.IDeferredContentOwner;
 import mx.core.IFactory;
-import mx.managers.IFocusManagerComponent;
-import mx.managers.IHistoryManagerClient;
 import mx.core.IInvalidating;
+import mx.core.INavigatorContent;
 import mx.core.IUIComponent;
 import mx.core.ScrollPolicy;
 import mx.core.UIComponent;
@@ -46,9 +45,10 @@
 import mx.events.IndexChangedEvent;
 import mx.geom.RoundedRectangle;
 import mx.managers.HistoryManager;
+import mx.managers.IFocusManagerComponent;
+import mx.managers.IHistoryManagerClient;
+import mx.styles.CSSStyleDeclaration;
 import mx.styles.StyleManager;
-import mx.styles.CSSStyleDeclaration;
-import mx.styles.StyleProxy;

 use namespace mx_internal;

@@ -962,18 +962,18 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function get selectedChild():Container
+    public function get selectedChild():INavigatorContent
     {
         if (selectedIndex == -1)
             return null;

-        return Container(getChildAt(selectedIndex));
-    }
-
-    /**
-     *  @private
-     */
-    public function set selectedChild(value:Container):void
+        return INavigatorContent(getChildAt(selectedIndex));
+    }
+
+    /**
+     *  @private
+     */
+    public function set selectedChild(value:INavigatorContent):void
     {
         var newIndex:int = getChildIndex(DisplayObject(value));

@@ -1305,7 +1305,7 @@
         // cache until we're fully initialized.  (bug 102639)
         // This check was moved from the beginning of this function to
         // here to fix bugs 103665/104213.
-        if (selectedChild && Container(selectedChild).numChildrenCreated == -1)
+        if (selectedChild && selectedChild.deferredContentCreated)
             return;

         // Don't remember sizes if we don't have any children
@@ -1450,7 +1450,7 @@
             var n:int = numChildren;
             for (var i:int = 0; i < n; i++)
             {
-                Container(getChildAt(i)).createComponentsFromDescriptors();
+                IDeferredContentOwner(getChildAt(i)).createDeferredContent();
             }
         }
     }
@@ -1572,7 +1572,7 @@
         overlayColor = color;
         overlayTargetArea = targetArea;

-        if (selectedChild && selectedChild.numChildrenCreated == -1) // No children have been created
+        if (selectedChild && selectedChild.deferredContentCreated == false) // No children have been created
         {
             // Wait for the childrenCreated event before creating the overlay
             selectedChild.addEventListener(FlexEvent.INITIALIZE,
@@ -1752,20 +1752,20 @@

         IDataRenderer(header).data = content;

-        if (content is Container)
-        {
-            var contentContainer:Container = Container(content);
+        if (content is INavigatorContent)
+        {
+            var contentContainer:INavigatorContent = INavigatorContent(content);

             header.label = contentContainer.label;
             if (contentContainer.icon)
                 header.setStyle("icon", contentContainer.icon);

             // If the child has a toolTip, transfer it to the header.
-            var toolTip:String = contentContainer.toolTip;
+            var toolTip:String = (contentContainer as UIComponent).toolTip;
             if (toolTip && toolTip != "")
             {
                 header.toolTip = toolTip;
-                contentContainer.toolTip = null;
+                (contentContainer as UIComponent).toolTip = null;
             }
         }

@@ -1841,7 +1841,7 @@
         var header:Button = Button(event.currentTarget);
         var oldIndex:int = selectedIndex;
         // content is placed onto the button so we have to access it via []
-        selectedChild = Container(IDataRenderer(header).data);
+        selectedChild = INavigatorContent(IDataRenderer(header).data);
         var newIndex:int = selectedIndex;
         if (oldIndex != newIndex)
             dispatchChangeEvent(oldIndex, newIndex, event);
@@ -1937,13 +1937,13 @@
         {
             // Need to set the new index to be visible here
             // in order for effects to work.
-            Container(getChildAt(newIndex)).setVisible(true);
+            IUIComponent(getChildAt(newIndex)).setVisible(true);

             // Now that the effects have been triggered, we can hide the
             // current view until it is properly sized and positioned below.
-            Container(getChildAt(newIndex)).setVisible(false, true);
+            IUIComponent(getChildAt(newIndex)).setVisible(false, true);
             if (oldIndex != -1)
-                Container(getChildAt(oldIndex)).setVisible(false);
+                IUIComponent(getChildAt(oldIndex)).setVisible(false);

             instantiateChild(selectedChild);
         }
@@ -1959,7 +1959,7 @@
     /**
      *  @private
      */
-    private function instantiateChild(child:Container):void
+    private function instantiateChild(child:INavigatorContent):void
     {
         // fix for bug#137430
         // when the selectedChild index is -1 (invalid value due to any reason)
@@ -1970,8 +1970,8 @@

         // Performance optimization: don't call createComponents if we know
         // that createComponents has already been called.
-        if (child && child.numChildrenCreated == -1)
-            child.createComponentsFromDescriptors();
+        if (child && child.deferredContentCreated == false)
+            child.createDeferredContent();

         // Do the initial measurement/layout pass for the newly-instantiated
         // descendants.
@@ -2028,14 +2028,14 @@
         // EffectManager might try to play another effect that animates the same
         // properties.
         if (oldSelectedIndex != -1)
-            Container(getChildAt(oldSelectedIndex)).tweeningProperties = ["x", "y", "width", "height"];
-        Container(getChildAt(newSelectedIndex)).tweeningProperties = ["x", "y", "width", "height"];
+            IUIComponent(getChildAt(oldSelectedIndex)).tweeningProperties = ["x", "y", "width", "height"];
+        IUIComponent(getChildAt(newSelectedIndex)).tweeningProperties = ["x", "y", "width", "height"];

         // If the content of the new child hasn't been created yet, set the new child
         // to the content width/height. This way any background color will show up
         // properly during the animation.
-        var newSelectedChild:Container = Container(getChildAt(newSelectedIndex));
-        if (newSelectedChild.numChildren == 0)
+        var newSelectedChild:IDeferredContentOwner = IDeferredContentOwner(getChildAt(newSelectedIndex));
+        if (newSelectedChild.deferredContentCreated == false)
         {
             var paddingLeft:Number = getStyle("paddingLeft");
             var contentX:Number = borderMetrics.left + (paddingLeft > 0 ? paddingLeft : 0);
@@ -2085,7 +2085,7 @@
         for (var i:int = 0; i < n; i++)
         {
             var header:Button = getHeaderAt(i);
-            var content:Container = Container(getChildAt(i));
+            var content:UIComponent = UIComponent(getChildAt(i));

             header.$y = y;
             y += header.height;
@@ -2130,7 +2130,7 @@
         var localContentHeight:Number = calcContentHeight();

         var y:Number = vm.top;
-        var content:Container;
+        var content:UIComponent;

         var n:int = numChildren;
         for (var i:int = 0; i < n; i++)
@@ -2141,7 +2141,7 @@

             if (i == selectedIndex)
             {
-                content = Container(getChildAt(i));
+                content = UIComponent(getChildAt(i));
                 content.cacheAsBitmap = false;
                 content.scrollRect = null;
                 content.visible = true;
@@ -2152,7 +2152,7 @@

         if (oldSelectedIndex != -1)
         {
-            content = Container(getChildAt(oldSelectedIndex));
+            content = UIComponent(getChildAt(oldSelectedIndex));
             content.cacheAsBitmap = false;
             content.scrollRect = null;
             content.visible = false;
@@ -2170,7 +2170,7 @@

         UIComponent.resumeBackgroundProcessing();

-        Container(getChildAt(selectedIndex)).tweeningProperties = null;
+        UIComponent(getChildAt(selectedIndex)).tweeningProperties = null;

         // If we interrupted a Dissolve effect, restart it here
         if (currentDissolveEffect)
@@ -2425,7 +2425,7 @@

                 // if something's selected, instantiate it
                 if (newIndex != -1)
-                    instantiateChild(Container(getChildAt(newIndex)));
+                    instantiateChild(INavigatorContent(getChildAt(newIndex)));
             }
             else
             {
@@ -2435,7 +2435,7 @@
                 // newIndex + 1 because currently that's what the index
                 // of the child is (SDK-12622) since this one isn't
                 // actually removed from the display list yet
-                instantiateChild(Container(getChildAt(newIndex+1)));
+                instantiateChild(INavigatorContent(getChildAt(newIndex+1)));
             }

             // Select the new selected index header.


- added additional error handling

- added additional error handling

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

--- src/reprise/external/AMFResource.as
+++ src/reprise/external/AMFResource.as
@@ -9,6 +9,7 @@
 {

 	import flash.events.IOErrorEvent;
+	import flash.events.NetStatusEvent;
 	import flash.events.SecurityErrorEvent;
 	import flash.net.NetConnection;
 	import flash.net.Responder;
@@ -125,6 +126,8 @@
 				netConnection_securityError);
 			m_netConnection.addEventListener(IOErrorEvent.IO_ERROR,
 				netConnection_ioError);
+			m_netConnection.addEventListener(NetStatusEvent.NET_STATUS,
+				netConnection_netStatus);
 			m_netConnection.call.apply(m_netConnection, params);
 		}

@@ -135,6 +138,8 @@
 				netConnection_securityError);
 			m_netConnection.removeEventListener(IOErrorEvent.IO_ERROR,
 				netConnection_ioError);
+			m_netConnection.removeEventListener(NetStatusEvent.NET_STATUS,
+				netConnection_netStatus);
 			m_netConnection = null;
 		}

@@ -168,5 +173,17 @@
 			trace(e);
 			onData(false);
 		}
+
+		protected function netConnection_netStatus(e:NetStatusEvent):void
+		{
+			if (e.info.hasOwnProperty('level') && e.info.level == 'error')
+			{
+				if (e.info.hasOwnProperty('code') && e.info.hasOwnProperty('details'))
+				{
+					trace(e.info.code + ' (' + e.info.details + ')');
+				}
+				onData(false);
+			}
+		}
 	}
 }


WIP - seems saner!

WIP - seems saner!

Jumping less. Usually makes remap decisions appropriately.

--- HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
+++ HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
@@ -284,6 +284,11 @@
 			trace("Scheduling reload for quality " + quality);
 			reloadingQuality = quality;

+			// Make sure we have knowledge of our current stream.
+			if(!checkAnySegmentKnowledge(getManifestForQuality(lastQuality).segments)
+				&& !_bestEffortDownloaderMonitor)
+				_pendingBestEffortRequest = initiateBestEffortRequest(uint.MAX_VALUE, lastQuality);
+
 			// Reload the manifest we were given, if we were given a manifest
 			var manToReload:HLSManifestParser = manifest ? manifest : getManifestForQuality(reloadingQuality);
 			reloadingManifest = new HLSManifestParser();
@@ -291,6 +296,7 @@
 			reloadingManifest.addEventListener(Event.COMPLETE, onReloadComplete);
 			reloadingManifest.addEventListener(IOErrorEvent.IO_ERROR, onReloadError);
 			reloadingManifest.reload(manToReload);
+
 		}

 		private function onReloadError(event:Event):void
@@ -475,35 +481,56 @@
 				if(!checkAnySegmentKnowledge(newManifest.segments)
 					&& !_bestEffortDownloaderMonitor)
 				{
-					trace("Encountered a live/VOD manifest with no timebase knowledge, request newest segment via best effort path for quality " + reloadingQuality);
+					trace("(A) Encountered a live/VOD manifest with no timebase knowledge, request newest segment via best effort path for quality " + reloadingQuality);
 					_pendingBestEffortRequest = initiateBestEffortRequest(uint.MAX_VALUE, reloadingQuality);
+				} else if(!checkAnySegmentKnowledge(currentManifest.segments)
+					&& !_bestEffortDownloaderMonitor)
+				{
+					trace("(A) Encountered a live/VOD manifest with no timebase knowledge, request newest segment via best effort path for quality " + reloadingQuality);
+					_pendingBestEffortRequest = initiateBestEffortRequest(uint.MAX_VALUE, reloadingQuality);
+				}
+
+				if(!checkAnySegmentKnowledge(newManifest.segments) && !checkAnySegmentKnowledge(currentManifest.segments))
+				{
+					trace("Bailing on reload due to lack of knowledge!");
+
+					// re-reload.
+					reloadingManifest = null; // don't want to hang on to it
+					if (reloadTimer) reloadTimer.start();
+
+					return;
+				}
+
+			}
+
+
+			// Remap time.
+			if(reloadingQuality != lastQuality)
+			{
+				updateSegmentTimes(currentManifest.segments);
+				updateSegmentTimes(newManifest.segments);
+
+				const fudgeTime:Number = 1.0;
+				var lastSeg:HLSManifestSegment = getSegmentBySequence(currentManifest.segments, lastSequence);
+				var newSeg:HLSManifestSegment = lastSeg ? getSegmentContainingTime(newManifest.segments, lastSeg.startTime + lastSeg.duration) : null;
+				if(newSeg == null)
+				{
+					trace("Remapping from " + lastSequence);
+					trace("ERROR: Couldn't remap sequence to new quality level, restarting at sequence " + newManifest.segments[0].id);
+					lastSequence = newManifest.segments[0].id;
+				}
+				else
+				{
+					trace("Remapping from " + lastSequence + " to " + (lastSeg.startTime + lastSeg.duration));
+					trace("===== Remapping to " + lastSequence + " new " + (newSeg.id));
+					lastSequence = newSeg.id;
 				}
 			}

 			// Update our manifest for this quality level.
+			trace("Setting quality to " + reloadingQuality);
 			manifest.streams[reloadingQuality].manifest = newManifest;
 			lastQuality = reloadingQuality;
-
-			// Remap time.
-			updateSegmentTimes(currentManifest.segments);
-			updateSegmentTimes(newManifest.segments);
-
-			var lastSeg:HLSManifestSegment = getSegmentBySequence(currentManifest.segments, lastSequence);
-			var newSeg:HLSManifestSegment = lastSeg ? getSegmentContainingTime(newManifest.segments, lastSeg.startTime + 0.2) : null;
-			if(newSeg == null)
-			{
-				trace("Remapping from " + lastSequence);
-				trace("ERROR: Couldn't remap sequence to new quality level, restarting at sequence " + newManifest.segments[0].id);
-				lastSequence = newManifest.segments[0].id;
-			}
-			else
-			{
-				trace("Remapping from " + lastSequence + " to " + (lastSeg.startTime + 0.2));
-				trace("===== Remapping to " + lastSequence + " new " + (newSeg.id));
-				lastSequence = newSeg.id;
-			}
-
-			trace("Setting quality to " + reloadingQuality);

 			// Kick off the next round as appropriate.
 			dispatchDVRStreamInfo();
@@ -632,6 +659,9 @@
 				return pber;
 			}

+			// Check for a pending reload.
+
+
 			if (stalled)
 			{
 				trace("Stalling -- quality[" + quality + "] lastQuality[" + lastQuality + "]");
@@ -698,6 +728,13 @@

 			var curSegment:HLSManifestSegment = getSegmentBySequence(segments, lastSequence);
+
+			if( segments.length > 0 && lastSequence < segments[0].id)
+			{
+				trace("Resetting too low sequence" + lastSequence + " to " + segments[0].id);
+				lastSequence = segments[0].id;
+			}
+
 			if ( curSegment != null )
 			{
 				trace("Getting Next Segment[" + lastSequence + "] StartTime: " + curSegment.startTime + " Continuity: " + curSegment.continuityEra + " URI: " + curSegment.uri);


Transferred from the Adobe Open Source Subversion Repository

Revision: 7746
Author:   cframpto@adobe.com
Date:     2009-06-11T14:21:27.549870Z

Log Message:
-----------
Remove optimization that was incorrect.  I already removed it from SimpleText.  The correct optimization was folded into updateDisplayList().

Add a comment for doc to TextGraphicElement.

QA Notes:
Doc Notes:
Bugs:
Reviewers: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -864,15 +864,6 @@
         releaseTextLines();

         createTextLines();
-
-        // If toFit and explicit width, adjust the bounds to match.
-        // This will save a recompose and/or clip in updateDisplayList() if
-        // the bounds width matches the unscaled width.
-        if (getStyle("lineBreak") == "toFit" && !isNaN(width) &&
-            bounds.width < width)
-        {
-            bounds.width = width;
-        }

         addTextLines(DisplayObjectContainer(drawnDisplayObject));


Transferred from the Adobe Open Source Subversion Repository

Revision: 6306
Author:   egeorgie@adobe.com
Date:     2009-04-28T01:17:42.359155Z

Log Message:
-----------
Layout PARB changes - rename "layout" package to "layouts"

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer:
tests: checkintests

Modified Paths:
--------------
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/BasicLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutElementHelper.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/RowAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/RowAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/Block.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/Block.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LinearLayoutVector.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText2.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalAlign.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/ColumnAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/ColumnAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileOrientation.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileOrientation.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -27,7 +27,7 @@

 import spark.components.supportClasses.GroupBase;
 import spark.events.RendererExistenceEvent;
-import spark.layout.supportClasses.LayoutBase;
+import spark.layouts.supportClasses.LayoutBase;

 use namespace mx_internal;  // for mx_internal property contentChangeDelta


Convenience function to make a vector out of two points.

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

--- src/as/com/threerings/flash/Vector2.as
+++ src/as/com/threerings/flash/Vector2.as
@@ -45,6 +45,14 @@
     }

     /**
+     * Creates a new Vector2 pointing from s to t.
+     */
+    public static function fromPoints (s :Point, t :Point) :Vector2
+    {
+        return new Vector2(t.x - s.x, t.y - s.y);
+    }
+
+    /**
      * Creates a Vector2 of magnitude 'len' that has been rotated about the origin by 'radians'.
      */
     public static function fromAngle (radians :Number, len :Number = 1) :Vector2


Transferred from the Adobe Open Source Subversion Repository

Revision: 22313
Author:   smgilson@adobe.com
Date:     2011-08-31T16:29:56.275972Z

Log Message:
-----------
ASDoc updates for ToggleSwitch.as

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintests

Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as

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

--- frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as
@@ -104,16 +104,18 @@

 /**
  *  The Spark ToggleSwitch control defines a binary switch that
- *  can be in the selected or unselected state.
+ *  can be in the selected or unselected position.
  *  The ToggleSwitch consists of a thumb skin part that moves between
  *  the two ends of the track skin part, similar to the Spark Slider control.
  *
- *
Clicking anywhere in the control toggles the state.
- *  You can also slide the thumb along the track to change state.
- *  When you release the thumb, the control changes state depending on
- *  where you released the thumb.
- *  If you release the thumb when you are over 50% of the way across the track,
- *  the switch enters the selected state. Otherwise, it enters the unselected state.

+ *
The ToggleSwitch control has two positions: selected and unselected.
+ *  By default, the label OFF corresponds to the unselected position and ON
+ *  corresponds to the selected position.

+ *
+ *
Clicking anywhere in the control toggles the position.
+ *  You can also slide the thumb along the track to change position.
+ *  When you release the thumb, it moves to the position, selected or unselected,
+ *  that is closest to the thumb location.

  *
  *
The ToggleSwitch control uses the following default values for
  *  the unselected and selected labels: OFF (unselected) and ON (selected).
@@ -121,7 +123,7 @@
  *  characteristics of the control.

  *
  *
The following skin class, defined as a subclass of
- *  spark.skins.mobile.ToggleSwitchSkin, changes the labels to Zero and One:

+ *  spark.skins.mobile.ToggleSwitchSkin, changes the labels to Yes and No:

  *
  *

  *  package skins
@@ -136,8 +138,8 @@
  *              super();
  *              // Set properties to define the labels
  *              // for the selected and unselected positions.
- *              selectedLabel="One";
- *              unselectedLabel="Zero";
+ *              selectedLabel="Yes";
+ *              unselectedLabel="No";
  *          }
  *      }
  *  }
@@ -287,9 +289,9 @@
     //  selected
     //----------------------------------
     /**
-     *  The current state of the toggle switch.
-     *  A value of false corresponds to the unselected state,
-     *  and a value of 1 corresponds to the selected state.
+     *  The current position of the toggle switch.
+     *  A value of false corresponds to the unselected position,
+     *  and a value of 1 corresponds to the selected position.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3


Transferred from the Adobe Open Source Subversion Repository

Revision: 11661
Author:   hmuller@adobe.com
Date:     2009-11-11T18:48:10.947370Z

Log Message:
-----------
If an item is added to an empty ListBase and requireSelection=true, then select it.

QE notes: Mustalla tests/gumbo/components/List pass
Doc notes:
Bugs: sdk-24100
Reviewer: Ryan
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1121,17 +1121,27 @@
      */
     protected function itemAdded(index:int):void
     {
-        if (selectedIndex == NO_SELECTION || doingWholesaleChanges)
+        // if doing wholesale changes, we'll handle this more effeciently in commitProperties() with dataProviderChanged == true
+        if (doingWholesaleChanges)
             return;
-
-        // If an item is added before the selected item, bump up our
-        // selected index backing variable. We check for valid values
-        // because there is a scenario when a ViewStack is the
-        // dataProvider and has its first child added that the ViewStack
-        // assigns selectedIndex to 0 then this code would
-        // bump it to 1.
-        if (index <= selectedIndex)
+
+        if (selectedIndex == NO_SELECTION)
+        {
+            // If there's no selection, there's nothing to adjust unless
+            // we requireSelection and need to select what was added
+            if (requireSelection)
+                adjustSelection(index);
+        }
+        else if (index <= selectedIndex)
+        {
+            // If an item is added before the selected item, bump up our
+            // selected index backing variable. We check for valid values
+            // because there is a scenario when a ViewStack is the
+            // dataProvider and has its first child added that the ViewStack
+            // assigns selectedIndex to 0 then this code would
+            // bump it to 1.
             adjustSelection(Math.min(selectedIndex + 1, dataProvider.length - 1));
+        }
     }

     /**