Transferred from the Adobe Open Source Subversion Repository

Revision: 5770
Author:   gruehle@adobe.com
Date:     2009-03-30T20:58:54.529722Z

Log Message:
-----------
Add [Alternative] metadata to the Halo components that have a Gumbo replacement.

Bugs: SDK-20190
QA notes: none
Doc notes: Additional ASDoc comments added for many of the classes. These should all be reviewed.
Reviewer: Chet

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TileList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Zoom.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToggleButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/HBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Cubic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/RemoveChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/TweenEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeRight.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/VBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Glow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quartic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Box.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeLeft.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quintic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Tween.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Tile.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/easing/Quadratic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/AddChildAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeDown.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/SetPropertyAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Canvas.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Blur.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HorizontalList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/WipeUp.as</path>

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

--- frameworks/projects/mx/src/mx/controls/LinkBar.as
+++ frameworks/projects/mx/src/mx/controls/LinkBar.as
@@ -209,6 +209,8 @@
 [IconFile("LinkBar.png")]

 [MaxChildren(0)]
+
+[Alternative(replacement="spark.components.ButtonBar", since="4.0")]

 /**
  *  A LinkBar control defines a horizontal or vertical row of LinkButton controls


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.automation.delegates.components.supportClasses
 {


[SequenceChecker]: Adjusted StandaloneUtils to new Feature model without uuid

git-svn-id: adbdea8fc1759bd16b0eaf24a244a7e5f870a654@77 fe3f0490-d73e-11de-a956-c71e7d3a9d2f


Added support for "attach://"-protocol to FileResource

--- src/reprise/external/FileResource.as
+++ src/reprise/external/FileResource.as
@@ -11,7 +11,8 @@
 	import flash.events.HTTPStatusEvent;
 	import flash.net.URLLoader;
 	import flash.net.URLRequest;
-	import flash.net.URLRequestMethod;
+	import flash.net.URLRequestMethod;
+	import flash.utils.ByteArray;

 	public class FileResource extends AbstractResource
 	{
@@ -46,14 +47,30 @@
 		{
 			return m_loader.data;
 		}
-
+
 		public override function bytesLoaded() : int
 		{
+			if (m_attachMode)
+			{
+				return 1;
+			}
+			if (!m_loader)
+			{
+				return 0;
+			}
 			return m_loader.bytesLoaded;
 		}
-
+
 		public override function bytesTotal() : int
 		{
+			if (m_attachMode)
+			{
+				return 1;
+			}
+			if (!m_loader)
+			{
+				return 0;
+			}
 			return m_loader.bytesTotal;
 		}

@@ -64,6 +81,26 @@
 		***************************************************************************/
 		protected override function doLoad() : void
 		{
+			// asset from library
+			if (m_url.indexOf('attach://') == 0)
+			{
+				var symbol : Class = resolveAttachSymbol();
+				if (!symbol)
+				{
+					onData(false);
+					return;
+				}
+				var binaryObject : Object = new symbol();
+				if (!(binaryObject is ByteArray))
+				{
+					logUnsupportedTypeMessage(symbol);
+					onData(false);
+					return;
+				}
+				m_data = ByteArray(binaryObject).toString();
+				onData(true);
+				return;
+			}
 			m_loader = new URLLoader();
 			m_loader.addEventListener(
 				HTTPStatusEvent.HTTP_STATUS, loader_httpStatus);
@@ -71,6 +108,7 @@
 			m_loader.load(createRequest());
 			//TODO: add error handling
 		}
+
 		protected function createRequest() : URLRequest
 		{
 			var request : URLRequest = new URLRequest(urlByAppendingTimestamp());


Transferred from the Adobe Open Source Subversion Repository

Revision: 22088
Author:   tkraikit@adobe.com
Date:     2011-08-19T00:23:26.657148Z

Log Message:
-----------
minor fix to SDK-31182: route retrieval of "today" date through property getter so QA can override for testing

also, animate minutes spinner if minuteStepSize changes and requires adjustment of displayed minutes

QE notes: none
Doc notes: none
Bugs: SDK-31182
Reviewer: jszeto
Tests run: checkintests
Is noteworthy for integration: no

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
+++ frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
@@ -564,7 +564,7 @@
     {
         // no-op if null; there must always be a selectedDate
         if (value == null)
-            value = new Date();
+            value = todayDate;

         // short-circuit if no change
         if (value.time == _selectedDate.time)
@@ -582,7 +582,7 @@
     {
         // no-op if null; there must always be a selectedDate
         if (value == null)
-            value = new Date();
+            value = todayDate;

         // short-circuit if no change
         if (value.time == _selectedDate.time)
@@ -711,6 +711,9 @@
                     // last adjustment to make sure we didn't accidentally go below minDate
                     if (selectedDate.time < minDate.time)
                         _selectedDate.minutes += minuteStepSize;
+
+                    // make sure to use animation for this
+                    useAnimationToSetSelectedDate = true;
                 }

                 minuteStepSizeChanged = false;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
 package spark.components
 {
 import flash.events.Event;


Transferred from the Adobe Open Source Subversion Repository

Revision: 19380
Author:   mcho@adobe.com
Date:     2010-12-15T00:00:09.653153Z

Log Message:
-----------
Replace fxg scrollbar skins with graphics drawing; Add 320 ppi for scrollbar skins

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

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/VScrollThumb.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/VScrollThumb.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/HScrollThumb.fxg</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/HScrollThumb.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
@@ -47,23 +47,26 @@
         super();

         useChromeColor = true;
-
-        // Depending on density set our measured width and height
+
+		layoutMeasuredWidth = 20;
+
+		// Depending on density set our measured height
         switch (applicationDPI)
         {
+			case DPIClassification.DPI_320:
+			{
+				layoutMeasuredHeight = 12;
+				break;
+			}
             case DPIClassification.DPI_240:
             {
-                layoutMeasuredWidth = 40;
-                layoutMeasuredHeight = 9;
-
+                layoutMeasuredHeight = 9;
                 break;
             }
             default:
             {
                 // default PPI160
-                layoutMeasuredWidth = 20;
-                layoutMeasuredHeight = 6;
-
+                layoutMeasuredHeight = 6;
                 break;
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19124
Author:   mcho@adobe.com
Date:     2010-12-07T23:55:59.858629Z

Log Message:
-----------
160 and 240 dpi mobile skins for VScrollbar and HScrollbar

QE notes:
Doc notes:
Bugs:
Reviewer: Jason SJ, Ryan
Tests run:
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarTrackSkin.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarTrackSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/src/views/ScrollbarView.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/assets</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/src/views/MobileSkinsHomeView.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/VScrollThumb.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/VScrollThumb.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/MobileSkins/assets/image.png</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile240/assets/HScrollThumb.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile160/assets/HScrollThumb.fxg</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
@@ -20,26 +20,32 @@

 public class HScrollBarSkin extends MobileSkin
-{
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
     public function HScrollBarSkin()
     {
         super();

         useChromeColor = true;

+		// Depending on density set our measured width and height
         switch (authorDensity)
         {
             case DeviceDensity.PPI_240:
             {
                 layoutMeasuredWidth = 40;
-                layoutMeasuredHeight = 8;
+                layoutMeasuredHeight = 9;

                 break;
             }
             default:
             {
                 // default PPI160
-                layoutMeasuredWidth = 26;
+                layoutMeasuredWidth = 20;
                 layoutMeasuredHeight = 6;

                 break;
@@ -52,47 +58,81 @@
     //  Variables
     //
     //--------------------------------------------------------------------------
-
+	/**
+	 *  @copy spark.skins.spark.ApplicationSkin#hostComponent
+	 */
     public var hostComponent:HScrollBar;

+
     //--------------------------------------------------------------------------
     //
     //  Skin parts
     //
     //--------------------------------------------------------------------------
-
+	/**
+	 *  HScrollbar track skin part
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
     public var track:Button;

+	/**
+	 *  HScrollbar thumb skin part
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
     public var thumb:Button;

+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods
     //
     //--------------------------------------------------------------------------
-
+	/**
+	 *  @private
+	 */
     override protected function createChildren():void
     {
-        // Create our skin parts: track and thumb.
-        track = new Button();
-        track.setStyle("skinClass", spark.skins.mobile.HScrollBarTrackSkin);
-        track.width = layoutMeasuredWidth;
-        track.height = layoutMeasuredHeight;
-        addChild(track);
+        // Create our skin parts if necessary: track and thumb.
+		if (!track)
+		{
+			// We don't want a visible track so we set the skin to MobileSkin
+	        track = new Button();
+	        track.setStyle("skinClass", spark.skins.mobile.supportClasses.MobileSkin);
+	        track.width = layoutMeasuredWidth;
+	        track.height = layoutMeasuredHeight;
+	        addChild(track);
+		}

-        thumb = new Button();
-        thumb.setStyle("skinClass", spark.skins.mobile.HScrollBarThumbSkin);
-        thumb.width = layoutMeasuredHeight;
-        thumb.height = layoutMeasuredHeight;
-        addChild(thumb);
+		if (!thumb)
+		{
+	        thumb = new Button();
+	        thumb.setStyle("skinClass", spark.skins.mobile.HScrollBarThumbSkin);
+	        thumb.width = layoutMeasuredHeight;
+	        thumb.height = layoutMeasuredHeight;
+	        addChild(thumb);
+		}
     }

+	/**
+	 *  @private
+	 */
     override protected function measure():void
     {
         measuredWidth = layoutMeasuredWidth;
         measuredHeight = layoutMeasuredHeight;
     }

+	/**
+	 *  @private
+	 */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
         setElementSize(track, unscaledWidth, unscaledHeight);


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

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

 package spark.globalization
 {


Make WaitForLayoutManager smarter. It checks to see if it needs to wait or not.

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

--- mustella/as3/src/mustella/WaitForLayoutManager.as
+++ mustella/as3/src/mustella/WaitForLayoutManager.as
@@ -55,8 +55,15 @@
 		var actualTarget:Object = context.stringToObject(target);
 		if (actualTarget)
 		{
-			actualTarget.addEventListener(eventName, eventListener);
-			eventListenerListening = true;
+			if (actualTarget.isInvalid())
+			{
+				actualTarget.addEventListener(eventName, eventListener);
+				eventListenerListening = true;
+			}
+			else
+			{
+				return true;
+			}
 		}


Be more careful about the ordering of connections.

We previously opened both Tor and client connections at once, and
registered all callbacks immediately. This means that one connection
could get a data callback and try to write to the other socket before it
was even connected. Now the Tor connection is made first, then the
client connection, and only then are the data callbacks registered.

--- swfcat.as
+++ swfcat.as
@@ -15,6 +15,14 @@
         private const TOR_PORT:int = 9001;

         private var output_text:TextField;
+
+        // Socket to Tor relay.
+        private var s_t:Socket;
+        // Socket to client.
+        private var s_c:Socket;
+
+        private var client_address:String;
+        private var client_port:int;

         private function puts(s:String):void
         {
@@ -40,7 +48,6 @@
         private function loaderinfo_complete(e:Event):void
         {
             var client_spec:String, parts:Array;
-            var client_address:String, client_port:int;

             puts("Parameters loaded.");
             client_spec = this.loaderInfo.parameters["client"];
@@ -57,45 +64,71 @@
             client_address = parts[0];
             client_port = parseInt(parts[1]);

-            go(TOR_ADDRESS, TOR_PORT, client_address, client_port);
+            go(TOR_ADDRESS, TOR_PORT);
         }

-        private function go(tor_address:String, tor_port:int,
-            client_address:String, client_port:int):void
+        /* We connect first to the Tor relay; once that happens we connect to
+           the client; and when both connections exist we begin relaying data. */
+        private function go(tor_address:String, tor_port:int):void
         {
-            var s_t:Socket = new Socket();
-            var s_c:Socket = new Socket();
+            s_t = new Socket();

-            s_t.addEventListener(Event.CONNECT, function (e:Event):void {
-                puts("Tor: connected.");
-            });
+            s_t.addEventListener(Event.CONNECT, tor_connected);
             s_t.addEventListener(Event.CLOSE, function (e:Event):void {
                 puts("Tor: closed.");
+                if (s_c.connected)
+                    s_c.close();
             });
             s_t.addEventListener(IOErrorEvent.IO_ERROR, function (e:IOErrorEvent):void {
                 puts("Tor: I/O error: " + e.text + ".");
+                if (s_c.connected)
+                    s_c.close();
             });
             s_t.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function (e:SecurityErrorEvent):void {
                 puts("Tor: security error: " + e.text + ".");
+                if (s_c.connected)
+                    s_c.close();
             });
+
+            puts("Tor: connecting to " + tor_address + ":" + tor_port + ".");
+            s_t.connect(tor_address, tor_port);
+        }
+
+        private function tor_connected(e:Event):void
+        {
+            s_c = new Socket();
+
+            puts("Tor: connected.");
+            s_c.addEventListener(Event.CONNECT, client_connected);
+            s_c.addEventListener(Event.CLOSE, function (e:Event):void {
+                puts("Client: closed.");
+                if (s_t.connected)
+                    s_t.close();
+            });
+            s_c.addEventListener(IOErrorEvent.IO_ERROR, function (e:IOErrorEvent):void {
+                puts("Client: I/O error: " + e.text + ".");
+                if (s_t.connected)
+                    s_t.close();
+            });
+            s_c.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function (e:SecurityErrorEvent):void {
+                puts("Client: security error: " + e.text + ".");
+                if (s_t.connected)
+                    s_t.close();
+            });
+
+            puts("Client: connecting to " + client_address + ":" + client_port + ".");
+            s_c.connect(client_address, client_port);
+        }
+
+        private function client_connected(e:Event):void
+        {
+            puts("Client: connected.");
+
             s_t.addEventListener(ProgressEvent.SOCKET_DATA, function (e:ProgressEvent):void {
                 var bytes:ByteArray = new ByteArray();
                 s_t.readBytes(bytes, 0, e.bytesLoaded);
                 puts("Tor: read " + bytes.length + ".");
                 s_c.writeBytes(bytes);
-            });
-
-            s_c.addEventListener(Event.CONNECT, function (e:Event):void {
-                puts("Client: connected.");
-            });
-            s_c.addEventListener(Event.CLOSE, function (e:Event):void {
-                puts("Client: closed.");
-            });
-            s_c.addEventListener(IOErrorEvent.IO_ERROR, function (e:IOErrorEvent):void {
-                puts("Client: I/O error: " + e.text + ".");
-            });
-            s_c.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function (e:SecurityErrorEvent):void {
-                puts("Client: security error: " + e.text + ".");
             });
             s_c.addEventListener(ProgressEvent.SOCKET_DATA, function (e:ProgressEvent):void {
                 var bytes:ByteArray = new ByteArray();
@@ -103,11 +136,6 @@
                 puts("Client: read " + bytes.length + ".");
                 s_t.writeBytes(bytes);
             });
-
-            puts("Tor: connecting to " + tor_address + ":" + tor_port + ".");
-            s_t.connect(tor_address, tor_port);
-            puts("Client: connecting to " + client_address + ":" + client_port + ".");
-            s_c.connect(client_address, client_port);
         }
     }
 }


Issue #21: Added an improved version of SettingsUI.

--- settingsui/src/SettingsUI.as
+++ settingsui/src/SettingsUI.as
@@ -1,32 +1,63 @@
 package
 {
-	import flash.events.*;
-	import flash.display.*;
-	import scaleform.clik.core.UIComponent;
-	import net.wg.infrastructure.base.AbstractWindowView;
+    import flash.events.*;
+    import flash.display.*;
+    import scaleform.clik.core.UIComponent;
+    import net.wg.infrastructure.base.AbstractWindowView;
+    import flash.text.TextField;
+    import net.wg.gui.components.controls.SoundButton;

-	public class SettingsUI extends AbstractWindowView {
-		public function SettingsUI() {
-			super();
-			DebugUtils.LOG_WARNING("TESSUMOD :: SettingsUI :: in constructor");
-		}

-		override protected function configUI(): void {
-			super.configUI();
-			DebugUtils.LOG_WARNING("TESSUMOD :: SettingsUI :: in configUI()");
-		}
-
-		override protected function onPopulate(): void {
-			super.onPopulate();
-			this.width = 600;
-			this.height = 400;
-			this.window.title = "Settings UI";
-			DebugUtils.LOG_WARNING("TESSUMOD :: SettingsUI :: in onPopulate()");
-		}
-
-		override protected function onDispose(): void {
-			super.onDispose();
-			DebugUtils.LOG_WARNING("TESSUMOD :: SettingsUI :: in onDispose()");
-		}
-	}
+    public class SettingsUI extends AbstractWindowView {
+
+        private var soundButtonOk:SoundButton;
+        private var soundButtonCancel:SoundButton;
+        private var textField:TextField;
+
+        public function SettingsUI() {
+            super();
+            this.textField = new TextField();
+            this.textField.x = 15;
+            this.textField.y = 15;
+            this.textField.width = 520;
+            this.textField.height = 20;
+            this.textField.text = "This is just a label that cannot be edited";
+            this.textField.textColor = 0xFFFFFF;
+            addChild(this.textField);
+
+            this.soundButtonOk = (this as UIComponent).addChild(App.utils.classFactory.getComponent("ButtonNormal", SoundButton, {
+                width: 100,
+                height: 25,
+                x: 195,
+                y: 265,
+            label: "Ok"})) as SoundButton;
+
+            this.soundButtonCancel = (this as UIComponent).addChild(App.utils.classFactory.getComponent("ButtonNormal", SoundButton, {
+                width: 100,
+                height: 25,
+                x: 305,
+                y: 265,
+            label: "Cancel"})) as SoundButton;
+
+            DebugUtils.LOG_WARNING("TESSUMOD :: SettingsUI :: in constructor");
+        }
+
+        override protected function configUI(): void {
+            super.configUI();
+            DebugUtils.LOG_WARNING("TESSUMOD :: SettingsUI :: in configUI()");
+        }
+
+        override protected function onPopulate(): void {
+            super.onPopulate();
+            this.width = 600;
+            this.height = 400;
+            this.window.title = "Settings UI";
+            DebugUtils.LOG_WARNING("TESSUMOD :: SettingsUI :: in onPopulate()");
+        }
+
+        override protected function onDispose(): void {
+            super.onDispose();
+            DebugUtils.LOG_WARNING("TESSUMOD :: SettingsUI :: in onDispose()");
+        }
+    }
 }


documentation fix

documentation fix

Change-Id: I419b35b8cb3408223c9c95a9f3a2a46139b55904

--- WeaveUI/src/weave/menus/WeaveMenuItem.as
+++ WeaveUI/src/weave/menus/WeaveMenuItem.as
@@ -22,7 +22,7 @@
 	import weave.core.LinkableBoolean;

 	/**
-	 * Dynamic menu item for use with a MenuBar.
+	 * Dynamic menu item for use with Flex Menus.
 	 *
 	 * Flex's DefaultDataDescriptor checks the following properties:
 	 *     label, children, enabled, toggled, type, groupName


Bug 551993 - Add a %%prefix clause to selftest specs [lhansen] (r+edwsmith)

--- extensions/selftest.as
+++ extensions/selftest.as
@@ -60,10 +60,11 @@
  *
  * Grammar
  *
- *   file      ::= component category ifdef* (decls | methods | prologue | epilogue | test)*
+ *   file      ::= component category ifdef* prefix? (decls | methods | prologue | epilogue | test)*
  *   component ::= SOL "%%component" ident EOL
  *   category  ::= SOL "%%category" ident EOL
  *   ifdef     ::= SOL ( "%%ifdef" | "%%ifndef" ) ident EOL
+ *   prefix    ::= SOL "%%prefix" EOL text
  *   decls     ::= SOL "%%decls" EOL text
  *   methods   ::= SOL "%%methods" EOL text
  *   prologue  ::= SOL "%%prologue" EOL text
@@ -99,12 +100,18 @@
  *   VMCFG_SELFTEST and also each of the names declared in %%ifdef
  *   statements.
  *
- *   The code that is generated comprises a class and its methods, all
- *   within a "namespace avmplus" block. Text in %%decls blocks is
- *   inserted verbatim into the class definition; text in %%methods
- *   blocks is inserted verbatim into the top level of the file.
- *   These sections allow the test case to define and use auxiliary
- *   data and methods.
+ *   Code is generated into a "namespace avmplus" block.
+
+ *   The %%prefix text, if any, is inserted verbatim before generated
+ *   classes or methods; it is useful for "use namespace", class
+ *   definitions, and so on.
+ *
+ *   Apart from the prefix, the code that is generated comprises a
+ *   class and its methods. Text in %%decls blocks is inserted
+ *   verbatim into the class definition; text in %%methods blocks is
+ *   inserted verbatim into the top level of the file following the
+ *   class definition.  These sections allow the test case to define
+ *   and use auxiliary data and methods.
  *
  *   The code in a %%prologue section will be run once, before any
  *   test in the file is run.  The code in an %%epilogue section will
@@ -132,6 +139,7 @@
 		var category = null;
 		var ifdefs = [];
 		var ifndefs = [];
+		var prefix = [];
 		var decls = [];
 		var methods = [];
 		var prologue = null;
@@ -179,28 +187,35 @@
 				state = 1;
 				st.ifndefs.push(res[1]);
 			}
+			else if (line.match(/^\s*%%prefix/)) {
+				if (state > 2)
+					throw "Too late to define prefix";
+			    state = 2;
+				st.prefix = text();
+				state = 3;
+			}
 			else if (line.match(/^\s*%%decls/)) {
-				state = 2;
+				state = 3;
 				pushMultiple(st.decls, text());
 			}
 			else if (line.match(/^\s*%%methods/)) {
-				state = 2;
+				state = 3;
 				pushMultiple(st.methods, text());
 			}
 			else if (line.match(/^\s*%%prologue/)) {
-				state = 2;
+				state = 3;
 				if (st.prologue != null)
 					throw "Prologue already defined";
 				st.prologue = text();
 			}
 			else if (line.match(/^\s*%%epilogue/)) {
-				state = 2;
+				state = 3;
 				if (st.epilogue != null)
 					throw "Epilogue already defined";
 				st.epilogue = text();
 			}
 			else if (res = /^\s*%%test\s+([a-zA-Z_][a-zA-Z0-9_]+)\s*$/.exec(line)) {
-				state = 2;
+				state = 3;
 				var loc = i;
 				var t = [];
 				var vs = 0;
@@ -277,6 +292,9 @@
 			s.push(st.ifndef_text);
 		s.push("namespace avmplus {");

+		for ( var i=0 ; i < st.prefix.length ; i++ )
+			s.push(st.prefix[i]);
+
 		s.push("class " + classname + " : public Selftest {");
         s.push("public:");
 		s.push(classname + "(AvmCore* core);");


Transferred from the Adobe Open Source Subversion Repository

Revision: 20219
Author:   dthakkar@adobe.com
Date:     2011-02-09T00:31:57.411477Z

Log Message:
-----------
QE notes:
Doc notes: Added alternative metatag
Bugs: SDK-28163
Reviewer: Masa,Harish
Tests run: Cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/CurrencyValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/SortField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/Sort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/NumberValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>

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

--- frameworks/projects/framework/src/mx/collections/Sort.as
+++ frameworks/projects/framework/src/mx/collections/Sort.as
@@ -25,6 +25,7 @@

 [DefaultProperty("fields")]
 [ResourceBundle("collections")]
+[Alternative(replacement="spark.collections.Sort", since="4.5")]

 /**
  *  Provides the sorting information required to establish a sort on an


Transferred from the Adobe Open Source Subversion Repository

Revision: 9433
Author:   clucier@adobe.com
Date:     2009-08-20T23:54:36.373816Z

Log Message:
-----------
Code complete for runtime design layers.  Incorporated PARB renames and refactoring.  Finished off all compiler optimizations that were spec'd.  Some minor bug fixes.

QE notes: Candidate checkin for code complete. You are welcome to write test plan against the current API.
Doc notes:  DesignLayer docs should be scrubbed.
Bugs:  N/A
Reviewer: Peter (compiler), Chet (renames), Paul (will review MXMLDocument post PTO).
Tests run: Checkin, added new basic test.
Is noteworthy for integration: Yes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<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/framework/src/mx/core/DesignLayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/DesignLayerTestScript.mxml</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/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/tests/basicTests/spark/views/DesignLayerTests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java</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/tests/basicTests/BasicTests-config.xml</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -2790,7 +2790,7 @@
         if (!initialized)
             return;

-        if (layer && !layer.computedVisibility)
+        if (designLayer && !designLayer.effectiveVisibility)
             value = false;

         if ($visible == value)
@@ -2838,8 +2838,8 @@
         {
             _alpha = value;

-            if (layer)
-                value = value * layer.computedAlpha;
+            if (designLayer)
+                value = value * designLayer.effectiveAlpha;

             $alpha = value;

@@ -3024,38 +3024,38 @@
      *  @private
      *  Storage for the layer property.
      */
-    private var _layer:DesignLayer;
+    private var _designLayer:DesignLayer;

     [Inspectable (environment='none')]

     /**
-     *  @copy mx.core.IVisualElement#layer
+     *  @copy mx.core.IVisualElement#designLayer
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function get layer():DesignLayer
-    {
-        return _layer;
+    public function get designLayer():DesignLayer
+    {
+        return _designLayer;
     }

     /**
      *  @private
      */
-    public function set layer(value:DesignLayer):void
-    {
-        if (_layer)
-            _layer.removeEventListener("layerPropertyChange", layer_PropertyChange, false);
+    public function set designLayer(value:DesignLayer):void
+    {
+        if (_designLayer)
+            _designLayer.removeEventListener("layerPropertyChange", layer_PropertyChange, false);

-        _layer = value;
+        _designLayer = value;

-        if (_layer)
-        {
-            _layer.addEventListener("layerPropertyChange", layer_PropertyChange, false, 0, true);
-            $alpha = _alpha * _layer.computedAlpha;
-            $visible = _visible && _layer.computedVisibility;
+        if (_designLayer)
+        {
+            _designLayer.addEventListener("layerPropertyChange", layer_PropertyChange, false, 0, true);
+            $alpha = _alpha * _designLayer.effectiveAlpha;
+            $visible = _visible && _designLayer.effectiveVisibility;
         }
     }

@@ -10962,14 +10962,14 @@
     {
         switch (event.property)
         {
-            case "computedVisibility":
+            case "effectiveVisibility":
             {
                 var newValue:Boolean = (event.newValue && _visible);
                 if (newValue != $visible)
                     $visible = newValue;
                 break;
             }
-            case "computedAlpha":
+            case "effectiveAlpha":
             {
                 var newAlpha:Number = Number(event.newValue) * _alpha;
                 if (newAlpha != $alpha)


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

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

 package mx.controls.listClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4990
Author:   gosmith@adobe.com
Date:     2009-02-17T21:55:37.728435Z

Log Message:
-----------
Initial support for truncation in TextBox and TextGraphic.

Their base class, TextGraphicElement, now has a truncation:int property. It defaults to 0, meaning "no truncation". Setting it to a positive integer such as 3 means "truncate to 3 lines", or fewer if 3 won't fit. Setting it to -1 means "truncate to as many lines as will fit".

Truncation does not work when lineBreak is "explicit".

The truncation indicator is a locale-dependent resource, the same one as for Halo text: the "truncationIndicator" resource in the "core" bundle. For en_US it is three periods; I don't remember why we haven't been using a single ellipsis character.

TextGraphic implements this property using the new TruncationOptions class usable with TLF's TextLineFactory. TextBox does not yet implement truncation, but will.

There is currently a TLF bug that if you apply truncation the Flex styles are ignored.

QE Notes: Please test changing the truncation property at runtime, and switching to a locale with a different truncation indicator.
Doc Notes: None
Bugs: None
Reviewer: Hans

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/TextGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -15,10 +15,13 @@
 import flash.display.DisplayObjectContainer;
 import flash.display.Graphics;
 import flash.display.Sprite;
+import flash.events.Event;
 import flash.geom.Rectangle;
 import flash.text.engine.TextLine;

 import mx.core.mx_internal;
+import mx.resources.IResourceManager;
+import mx.resources.ResourceManager;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.IAdvancedStyleClient;
 import mx.styles.StyleManager;
@@ -36,6 +39,22 @@

     //--------------------------------------------------------------------------
     //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Most resources are fetched on the fly from the ResourceManager,
+     *  so they automatically get the right resource when the locale changes.
+     *  But since truncation can happen frequently,
+     *  this class caches this resource value in this variable
+     *  and updates it when the locale changes.
+     */
+    mx_internal static var truncationIndicatorResource:String;
+
+    //--------------------------------------------------------------------------
+    //
     //  Constructor
     //
     //--------------------------------------------------------------------------
@@ -46,6 +65,20 @@
     public function TextGraphicElement()
     {
         super();
+
+		var resourceManager:IResourceManager = ResourceManager.getInstance();
+
+		if (!mx_internal::truncationIndicatorResource)
+        {
+            mx_internal::truncationIndicatorResource = resourceManager.getString(
+                "core", "truncationIndicator");
+        }
+
+        // Register as a weak listener for "change" events from ResourceManager.
+        // If UITextFields registered as a strong listener,
+        // they wouldn't get garbage collected.
+        resourceManager.addEventListener(
+            Event.CHANGE, resourceManager_changeHandler, false, 0, true);
     }

     //--------------------------------------------------------------------------
@@ -369,6 +402,37 @@
         }
     }

+    //----------------------------------
+    //  truncation
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _truncation:int = 0;
+
+    /**
+     *  Documentation is not currently available.
+     */
+    public function get truncation():int
+    {
+    	return _truncation;
+    }
+
+    /**
+     *  @private
+     */
+    public function set truncation(value:int):void
+    {
+    	if (value != _truncation)
+    	{
+    		_truncation = value;
+
+    		invalidateSize();
+    		invalidateDisplayList();
+    	}
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods: GraphicElement
@@ -640,6 +704,26 @@
             text = isEmpty ? "" : text;
         }
     }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function resourceManager_changeHandler(event:Event):void
+    {
+		var resourceManager:IResourceManager = ResourceManager.getInstance();
+
+        mx_internal::truncationIndicatorResource = resourceManager.getString(
+            "core", "truncationIndicator");
+
+        invalidateSize();
+        invalidateDisplayList();
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6183
Author:   cframpto@adobe.com
Date:     2009-04-21T17:34:47.501694Z

Log Message:
-----------
- Fix truncation. The measured resource indicator is width dependent so if it's cached it needs to be tossed if either the truncation indicator string changes or the width of the SimpleText changes.
- Fix measuredOneLine variable.  If it's SimpleText need to know if all the lines have been composed since simple text stops composing lines when it runs out of text or as soon as the next line completely falls outside of the bounds.
- Add missing config param to call to TextFilter.getImporter().  It was meant to be used.
- In RichText, the last one set, either text, or content, should take precedence.  Remove code which gave content precedence.

QE Notes:
Doc Notes:
Bugs:
Reviewers: Gordon needs to review all of RichText/SimpleText when all the functionality is implemented

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>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -137,13 +137,6 @@

     /**
      *  @private
-     *  The textLines created to measure the truncationResourceIndicator.
-     *  The array will be allocated the first time truncation is done.
-     */
-    mx_internal var truncationIndicatorLines:Array;
-
-    /**
-     *  @private
      *  The value of bounds.width, before the compose was done.
      */
     private var _composeWidth:Number;
@@ -634,7 +627,9 @@
         // to specify width different from the explicit.
         var constrainedWidth:Number =
             !isNaN(_widthConstraint) ? _widthConstraint : explicitWidth;
-        composeTextLines(constrainedWidth, explicitHeight);
+
+        var allLinesComposed:Boolean =
+            composeTextLines(constrainedWidth, explicitHeight);

         // Anytime we are composing we need to invalidate the display list
         // as we may have messed up the text lines.
@@ -659,8 +654,8 @@

         // Remember the number of text lines during measure. We can use this to
         // optimize the double measure scheme for text reflow.
-        _measuredOneTextLine = mx_internal::textLines.length == 1 &&
-                               !mx_internal::isOverset;
+        _measuredOneTextLine = allLinesComposed &&
+                               mx_internal::textLines.length == 1;

         //trace(id, drawnDisplayObject.name, "measure", measuredWidth, measuredHeight);
     }
@@ -1097,13 +1092,17 @@

     /**
      *  @private
+     *  Returns false to indicate no lines were composed.
+     *
      *  TODO This should be mx_internal, but that causes a compiler error.
      */
     protected function composeTextLines(width:Number = NaN,
-										height:Number = NaN):void
+										height:Number = NaN):Boolean
 	{
 	    _composeWidth = width;
 	    _composeHeight = height;
+
+	    return false;
 	}

 	/**
@@ -1314,10 +1313,6 @@
         mx_internal::truncationIndicatorResource = resourceManager.getString(
             "core", "truncationIndicator");

-        // Need to remeasure the new truncation indicator for SimpleText.
-        if (mx_internal::truncationIndicatorLines)
-            mx_internal::truncationIndicatorLines.length = 0;
-
         // If we're truncating, recompose the text.
         if (truncation != 0)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4575
Author:   egeorgie@adobe.com
Date:     2009-01-16T23:41:41.363653Z

Log Message:
-----------
Fix bug http://bugs.adobe.com/jira/browse/SDK-18729 getMaxBoundsWidth() and getMaxBoundsHeight() for FxButton return Number.MAX_VALUE instead of 10000

Fix: switch the default max value for LayoutElementUIComponentUtils to 10000, same as in UIComponent.

QE Notes: None
Doc Notes: None
Bugs: SDK-18729
Reviewer: Ryan
tests: checkintest

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

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -929,6 +929,8 @@
      *  @default 10000
      */
     public static const DEFAULT_MAX_WIDTH:Number = 10000;
+    // When changing this constant, make sure you change
+    // the constant with the same name in LayoutElementUIComponentUtils

     /**
      *  The default value for the maxHeight property.
@@ -936,6 +938,8 @@
      *  @default 10000
      */
     public static const DEFAULT_MAX_HEIGHT:Number = 10000;
+    // When changing this constant, make sure you change
+    // the constant with the same name in LayoutElementUIComponentUtils

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4009
Author:   jimurphy@adobe.com
Date:     2008-11-04T15:10:34.970681Z

Log Message:
-----------
Merged alpha_gumbo revisions 3929,3936-3937,3945,3956,3971,3986,3994,4002,4006 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.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/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.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/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon_small.png</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/flex4/src/mx/graphics/StrokedElement.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/effectClasses/TweenEffectInstance.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</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/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.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/core/UIComponent.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/flex4/src/mx/components/FxContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon_small.png</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -7672,8 +7672,22 @@
         var destination:State = getState(requestedCurrentState);

         // Stop any transition that may still be playing
+        var prevTransitionFraction:Number;
         if (_currentTransitionEffect)
+        {
+            if (_currentTransitionEffect.autoReverse &&
+                _currentTransitionEffect.fromState == requestedCurrentState &&
+                _currentTransitionEffect.toState == _currentState)
+            {
+                if (_currentTransitionEffect.duration == 0)
+                    prevTransitionFraction = 0;
+                else
+                    prevTransitionFraction =
+                        _currentTransitionEffect.playheadTime /
+                        _currentTransitionEffect.duration;
+            }
             _currentTransitionEffect.end();
+        }

         // Initialize the state we are going to.
         initializeState(requestedCurrentState);
@@ -7719,7 +7733,11 @@
             UIComponentGlobals.layoutManager.validateNow();
             _currentTransitionEffect = transition;
             transition.addEventListener(EffectEvent.EFFECT_END, transition_effectEndHandler);
+            transition.fromState = oldState;
+            transition.toState = _currentState;
             transition.play();
+            if (!isNaN(prevTransitionFraction) && transition.duration != 0)
+                transition.seek((1 - prevTransitionFraction) * transition.duration);
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 10079
Author:   rfrishbe@adobe.com
Date:     2009-09-09T02:45:32.309826Z

Log Message:
-----------
Reverting part of previous change around UIComponent.hasComplexLayoutMatrix

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

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -1727,6 +1727,13 @@
      * storage for advanced layout and transform properties.
      */
     private var _layoutFeatures:AdvancedLayoutFeatures;
+
+    /**
+     * @private
+     *
+     * when true, the transform on this component consists only of translation.  Otherwise, it may be arbitrarily complex.
+     */
+    protected var hasDeltaIdentityTransform:Boolean = true;

     /**
      * @private
@@ -2156,6 +2163,7 @@
         if (rotation == value)
             return;

+        hasDeltaIdentityTransform = false;
         if (_layoutFeatures == null)
         {
             // clamp the rotation value between -180 and 180.  This is what
@@ -2520,6 +2528,8 @@
             var prevValue:Number = (_layoutFeatures == null)? scaleX:_layoutFeatures.layoutScaleX;
             if (prevValue == value)
                 return;
+
+            hasDeltaIdentityTransform = false;

             // trace("set scaleX:" + this + "value = " + value);
             if (_layoutFeatures == null)
@@ -2602,6 +2612,8 @@
             if (prevValue == value)
                 return;

+            hasDeltaIdentityTransform = false;
+
             if (_layoutFeatures == null)
                 super.scaleY = value;
             else
@@ -2660,6 +2672,7 @@
         if (_layoutFeatures == null)
             initAdvancedLayoutFeatures();

+        hasDeltaIdentityTransform = false;
 		_layoutFeatures.layoutScaleZ = value;
         invalidateTransform();
         invalidateProperties();
@@ -11727,6 +11740,8 @@
     {
         var features:AdvancedLayoutFeatures = new AdvancedLayoutFeatures();

+        hasDeltaIdentityTransform = false;
+
         features.layoutScaleX = scaleX;
         features.layoutScaleY = scaleY;
         features.layoutScaleZ = scaleZ;
@@ -11884,6 +11899,7 @@
      */
     public function setLayoutMatrix(value:Matrix, invalidateLayout:Boolean):void
     {
+        hasDeltaIdentityTransform = false;
         if (_layoutFeatures == null)
         {
             // flash will make a copy of this on assignment.
@@ -12429,7 +12445,7 @@

     protected function nonDeltaLayoutMatrix():Matrix
     {
-        if (hasComplexLayoutMatrix)
+        if (hasDeltaIdentityTransform)
             return null;
         if (_layoutFeatures != null)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 9715
Author:   aharui@adobe.com
Date:     2009-08-27T21:20:28.280781Z

Log Message:
-----------
Introduce tabFocusEnabled to IFocusManagerComponent.  This replaces tabEnabled as the way to remove a component from the tabbing loop.  tabEnabled should be set to true for any component that can receive focus, and tabFocusEnabled determines whether the FocusManager will actually give it focus.  If tabEnabled=false on a non-TextField, the player will sometimes momentarily remove focus and dispatch a focusOut when the component has focus and is later clicked on.  This is now quite common with TLF-based text components so we are forced to make this change.

QE Notes: tests using tabEnabled must now use tabFocusEnabled
Doc Notes: needs documentation
Bugs: SDK-22731
Reviewer: Gordon
API Change: Yes
Is noteworthy for integration: Yes
tests: checkintests cyclone

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.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/framework/src/mx/controls/Menu.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/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Image.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/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/mx/src/mx/containers/TabNavigator.as
+++ frameworks/projects/mx/src/mx/containers/TabNavigator.as
@@ -378,6 +378,7 @@
         // Container.init() has set tabEnabled false, so we
         // have to set it back to true.
         tabEnabled = true;
+        tabFocusEnabled = true;
         hasFocusableChildren = true;

         historyManagementEnabled = true;


USER_KICKED and USER_BANNED events are now dispatched after updating the room roster (like USER_DEPARTURE) instead of before.
It was incorrect to receive a USER_KICKED or USER_BANNED event and still see the user in the roster.

git-svn-id: c197267f952b24206666de142881703007ca05d5@11791 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/igniterealtime/xiff/conference/Room.as
+++ src/org/igniterealtime/xiff/conference/Room.as
@@ -905,18 +905,6 @@
 									case 201:
 										unlockRoom( myIsReserved );
 										break;
-
-									case 307:
-										roomEvent = new RoomEvent( RoomEvent.USER_KICKED );
-										roomEvent.nickname = presence.from.resource;
-										dispatchEvent( roomEvent );
-										break;
-
-									case 301:
-										roomEvent = new RoomEvent( RoomEvent.USER_BANNED );
-										roomEvent.nickname = presence.from.resource;
-										dispatchEvent( roomEvent );
-										break;
 								}
 							}

@@ -1035,10 +1023,22 @@
 					var user:MUCUserExtension = aPresence.getAllExtensionsByNS( MUCUserExtension.NS )[ 0 ];
 					for each ( var status:MUCStatus in user.statuses )
 					{
-						// If the user left as a result of a kick or ban, so no need to dispatch a USER_DEPARTURE event as we already dispatched USER_KICKED/USER_BANNED
-						if ( status.code == 307 || status.code == 301 )
+						switch ( status.code )
 						{
-							return;
+							// If the user left as a result of a ban or kick, we dispatch a USER_BANNED/USER_KICKED event instead of a USER_DEPARTURE event
+							case 301:
+								roomEvent = new RoomEvent( RoomEvent.USER_BANNED );
+								roomEvent.nickname = userNickname;
+								roomEvent.data = aPresence;
+								dispatchEvent( roomEvent );
+								return;
+
+							case 307:
+								roomEvent = new RoomEvent( RoomEvent.USER_KICKED );
+								roomEvent.nickname = userNickname;
+								roomEvent.data = aPresence;
+								dispatchEvent( roomEvent );
+								return;
 						}
 					}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8574
Author:   aharui@adobe.com
Date:     2009-07-15T05:33:44.225721Z

Log Message:
-----------
Bugs related to TLF and focus.  Also TLF Marshall Plan adjustments, and some IME fixes

QE Notes: None
Doc Notes: None
Bugs: SDK-21278, SDK-21686, SDK-21375, SDK-18516, SDK-15093, SDK-21335
Reviewer: darrell, carol
tests: checkintests mustella/gumbo mustella/components

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IIMESupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as</path>
<path kind="file" action="M">/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/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.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/supportClasses/SkinnableTextBase.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/controls/TextInput.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/SkinnableDataContainer.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/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Label.as
+++ frameworks/projects/mx/src/mx/controls/Label.as
@@ -365,8 +365,6 @@
     {
         super();

-        // this is so the UITextField we contain can be read by a screen-reader
-        tabChildren = true;
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 158
Author:   jszeto@adobe.com
Date:     2008-01-11T07:17:51.518779Z

Log Message:
-----------
Flex SDK Bug Fix

SDK-14226 - Container uses scale9Grid as borderMetrics

Changed container and ScrollControlBase to no longer use the skin's scale9Grid as the borderMetrics.

Bug: SDK-14226
QA: Yes
Doc: No

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

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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -828,8 +828,8 @@
      */
     public function get borderMetrics():EdgeMetrics
     {
-        return border && border is IBorder ?
-               IBorder(border).borderMetrics :
+        return border && border is IRectangularBorder ?
+               IRectangularBorder(border).borderMetrics :
                EdgeMetrics.EMPTY;
     }


Issue #173: Extract uppercase field name variable.

--- src/widgets/supportClasses/ResultAttributes.as
+++ src/widgets/supportClasses/ResultAttributes.as
@@ -132,16 +132,17 @@
                 }
             }

-            if (titleField && fieldName.toUpperCase() == titleField.toUpperCase())
+            var upperCaseFieldName:String = fieldName.toUpperCase();
+            if (titleField && upperCaseFieldName == titleField.toUpperCase())
             {
                 title = value;
             }
-            else if (linkField && fieldName.toUpperCase() == linkField.toUpperCase())
+            else if (linkField && upperCaseFieldName == linkField.toUpperCase())
             {
                 link = value;
                 linkAlias = linkAlias;
             }
-            else if (fieldName.toUpperCase() != "SHAPE_LENGTH" && fieldName.toUpperCase() != "SHAPE_AREA")
+            else if (upperCaseFieldName != "SHAPE_LENGTH" && upperCaseFieldName != "SHAPE_AREA")
             {
                 var fieldLabel:String;


Spammy.

Spammy.

--- tamarin-central/thane/as3src/avmplus/Domain.as
+++ tamarin-central/thane/as3src/avmplus/Domain.as
@@ -49,9 +49,7 @@
             throw new Error("Illegal operation");
         }

-        trace("Initializing new domain...");
         initNewDomain();
-        trace("Domain initialized!");
     }
     private native function initNewDomain () :void;

@@ -60,9 +58,7 @@
         if (!Thanette.isSystemDomain()) {
             throw new Error("Illegal operation");
         }
-        trace("Domain: loading bytes...");
         doLoadBytes(byteArray);
-        trace("Domain: bytes loaded!");
     }
 	private native function doLoadBytes (byteArray :ByteArray);


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

--- frameworks/projects/framework/src/mx/effects/effectClasses/FadeInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/FadeInstance.as
@@ -0,0 +1,228 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects.effectClasses
+{
+
+import flash.events.Event;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+
+/**
+ *  The FadeInstance class implements the instance class
+ *  for the Fade effect.
+ *  Flex creates an instance of this class when it plays a Fade effect;
+ *  you do not create one yourself.
+ *
+ *
Every effect class that is a subclass of the TweenEffect class
+ *  supports the following events:

+ *
+ *

+ *
tweenEnd: Dispatched when the tween effect ends.

+ *
+ *
tweenUpdate: Dispatched every time a TweenEffect
+ *      class calculates a new value.

+ *

+ *
+ *
The event object passed to the event listener for these events is of type TweenEvent.
+ *  The TweenEvent class defines the property value, which contains
+ *  the tween value calculated by the effect.
+ *  For the Fade effect,
+ *  the TweenEvent.value property contains a Number between the values of the
+ *  Fade.alphaFrom and Fade.alphaTo properties.

+ *
+ *  @see mx.effects.Fade
+ *  @see mx.events.TweenEvent
+ */
+public class FadeInstance extends TweenEffectInstance
+{
+    include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param target The Object to animate with this effect.
+	 */
+	public function FadeInstance(target:Object)
+	{
+		super(target);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  The original transparency level.
+	 */
+	private var origAlpha:Number = NaN;
+
+	/**
+	 *  @private
+	 */
+	private var restoreAlpha:Boolean;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  alphaFrom
+	//----------------------------------
+
+	/**
+	 *  Initial transparency level between 0.0 and 1.0,
+	 *  where 0.0 means transparent and 1.0 means fully opaque.
+	 */
+	public var alphaFrom:Number;
+
+	//----------------------------------
+	//  alphaFrom
+	//----------------------------------
+
+	/**
+	 *  Final transparency level between 0.0 and 1.0,
+	 *  where 0.0 means transparent and 1.0 means fully opaque.
+	 */
+	public var alphaTo:Number;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function initEffect(event:Event):void
+	{
+		super.initEffect(event);
+
+		switch (event.type)
+		{
+			case "childrenCreationComplete":
+			case FlexEvent.CREATION_COMPLETE:
+			case FlexEvent.SHOW:
+			case Event.ADDED:
+			case "resizeEnd":
+			{
+				if (isNaN(alphaFrom))
+					alphaFrom = 0;
+				if (isNaN(alphaTo))
+					alphaTo = target.alpha;
+				break;
+			}
+
+			case FlexEvent.HIDE:
+			case Event.REMOVED:
+			case "resizeStart":
+			{
+				restoreAlpha = true;
+				if (isNaN(alphaFrom))
+					alphaFrom = target.alpha;
+				if (isNaN(alphaTo))
+					alphaTo = 0;
+				break;
+			}
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function play():void
+	{
+		// Dispatch an effectStart event from the target.
+		super.play();
+
+		// Try to cache the target as a bitmap.
+		//EffectManager.mx_internal::startBitmapEffect(target);
+
+		// Remember the original value of the target object's alpha
+		origAlpha = target.alpha;
+
+		var values:PropertyChanges = propertyChanges;
+
+		// If nobody assigned a value, make this a "show" effect.
+		if (isNaN(alphaFrom) && isNaN(alphaTo))
+		{
+			if (values && values.end["alpha"] !== undefined)
+			{
+				alphaFrom = origAlpha;
+				alphaTo = values.end["alpha"];
+			}
+			else if (values && values.end["visible"] !== undefined)
+			{
+				alphaFrom = values.start["visible"] ? origAlpha : 0;
+				alphaTo = values.end["visible"] ? origAlpha : 0;
+			}
+			else
+			{
+				alphaFrom = 0;
+				alphaTo = origAlpha;
+			}
+		}
+		else if (isNaN(alphaFrom))
+		{
+			alphaFrom = (alphaTo == 0) ? origAlpha : 0;
+		}
+		else if (isNaN(alphaTo))
+		{
+			if (values && values.end["alpha"] !== undefined)
+			{
+				alphaTo = values.end["alpha"];
+			}
+			else
+			{
+				alphaTo = (alphaFrom == 0) ? origAlpha : 0;
+			}
+		}
+
+		tween = createTween(this, alphaFrom, alphaTo, duration);
+		target.alpha = tween.mx_internal::getCurrentValue(0)
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function onTweenUpdate(value:Object):void
+	{
+		target.alpha = value;
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function onTweenEnd(value:Object):void
+	{
+		// Call super function first so we don't clobber resetting the alpha.
+		super.onTweenEnd(value);
+
+		if (mx_internal::hideOnEffectEnd || restoreAlpha)
+		{
+			target.alpha = origAlpha;
+		}
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/validators/SocialSecurityValidator.as
+++ frameworks/projects/framework/src/mx/validators/SocialSecurityValidator.as
@@ -40,6 +40,11 @@
  *

  *
  *  @includeExample examples/SocialSecurityValidatorExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class SocialSecurityValidator extends Validator
 {
@@ -68,6 +73,11 @@
 	 *  object for each field examined by the validator.
 	 *
 	 *  @see mx.validators.ValidationResult
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static function validateSocialSecurity(
 								validator:SocialSecurityValidator,
@@ -146,6 +156,11 @@

 	/**
 	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function SocialSecurityValidator()
 	{
@@ -178,6 +193,11 @@
 	 *  Specifies the set of formatting characters allowed in the input.
 	 *
 	 *  @default "()- .+" // ?????
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get allowedFormatChars():String
 	{
@@ -241,6 +261,11 @@
 	 *  defined by the allowedFormatChars property.
 	 *
 	 *  @default "You entered invalid characters in your Social Security number."
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get invalidCharError():String
 	{
@@ -281,6 +306,11 @@
 	 *  Error message when the value is incorrectly formatted.
 	 *
 	 *  @default "The Social Security number must be 9 digits or in the form NNN-NN-NNNN."
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get wrongFormatError():String
 	{
@@ -321,6 +351,11 @@
 	 *  Error message when the value contains an invalid Social Security number.
 	 *
 	 *  @default "Invalid Social Security number; the number cannot start with 000."
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function get zeroStartError():String
 	{
@@ -372,6 +407,11 @@
      *
 	 *  @return An Array of ValidationResult objects, with one ValidationResult
 	 *  object for each field examined by the validator.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	override protected function doValidation(value:Object):Array
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4197
Author:   egeorgie@adobe.com
Date:     2008-11-27T01:27:18.045198Z

Log Message:
-----------
Fix bug http://bugs.adobe.com/jira/browse/SDK-18219 Strange layout behavior in Gumbo

The problem is cause by a fallout from my change 4137: we zeroed out measured sizes of Groups in cases where children size is re-calculated but stays the same. The fix is to zero out measured sizes of Group only when Group's size is invalid and measure will recalculate it.

QE Notes: None
Doc Notes: None
Bugs: SDK-18219
Reviewer: Ryan
tests: checkintests, mustella (layout, group, dataGroup)

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -587,10 +587,10 @@
      */
     override protected function measure():void
     {
-        super.measure();
+        if (_layout && layoutInvalidateSizeFlag)
+        {
+            super.measure();

-        if (_layout && layoutInvalidateSizeFlag)
-        {
             layoutInvalidateSizeFlag = false;
             _layout.measure();
         }


Fix minor bug

Fix minor bug

--- src/aerys/minko/type/data/DataBindings.as
+++ src/aerys/minko/type/data/DataBindings.as
@@ -100,8 +100,8 @@

 				_bindingNames.splice(indexOf, 1);

-				if (_bindingNameToValue[bindingName] is IDataProvider)
-					IDataProvider(_bindingNameToValue[bindingName]).changed.remove(providerPropertyChangedHandler);
+				if (_bindingNameToValue[bindingName] is IMonitoredData)
+					IMonitoredData(_bindingNameToValue[bindingName]).changed.remove(providerPropertyChangedHandler);

 				delete _bindingNameToValue[bindingName];
 				delete _bindingNameToProvider[bindingName];


Bring back the scrollable menu.  However, we leave the default as not scrolling, and only do
scrolling of any kind of the verticalScrollPolicy is set to ScrollPolicy.AUTO or ScrollPolicy.ON,
and the maxHeight has been set.

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

--- src/as/com/threerings/flex/CommandMenu.as
+++ src/as/com/threerings/flex/CommandMenu.as
@@ -23,6 +23,8 @@

 import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
+
+import flash.events.Event;
 import flash.events.IEventDispatcher;

 import flash.geom.Point;
@@ -98,6 +100,35 @@
         return menu;
     }

+    /**
+     * The mx.controls.Menu class overrides setting and getting the verticalScrollPolicy
+     * basically setting the verticalScrollPolicy did nothing, and getting it always returned
+     * ScrollPolicy.OFF.  So that's not going to work if we want the menu to scroll. Here we
+     * reinstate the verticalScrollPolicy setter, and keep a local copy of the value in a
+     * protected variable _verticalScrollPolicy.
+     *
+     * This setter is basically a copy of what ScrollControlBase and ListBase do.
+     */
+    override public function set verticalScrollPolicy (value :String) :void
+    {
+        var newPolicy :String = value.toLowerCase();
+
+        itemsSizeChanged = true;
+
+        if (_verticalScrollPolicy != newPolicy)
+        {
+            _verticalScrollPolicy = newPolicy;
+            dispatchEvent(new Event("verticalScrollPolicyChanged"));
+        }
+
+        invalidateDisplayList();
+    }
+
+    override public function get verticalScrollPolicy () :String
+    {
+        return _verticalScrollPolicy;
+    }
+
     public function CommandMenu ()
     {
         super();
@@ -186,6 +217,52 @@
         }

         PopUpUtil.fitInRect(this, _fitting || screen);
+    }
+
+    /**
+     * The Menu class overrode configureScrollBars() and made the function do nothing.  That means
+     * the scrollbars don't know how to draw themselves, so here we reinstate configureScrollBars.
+     * This is basically a copy of the same method from the mx.controls.List class.
+     */
+    override protected function configureScrollBars () :void
+    {
+        var rowCount :int = listItems.length;
+        if (rowCount == 0) {
+            return;
+        }
+
+        // if there is more than one row and it is a partial row we don't count it
+        if (rowCount > 1 &&
+            rowInfo[rowCount - 1].y + rowInfo[rowCount - 1].height > listContent.height) {
+            rowCount--;
+        }
+
+        // offset, when added to rowCount, is hte index of the dataProvider item for that row.
+        // IOW, row 10 in listItems is showing dataProvider item 10 + verticalScrollPosition -
+        // lockedRowCount - 1
+        var offset :int = verticalScrollPosition - lockedRowCount - 1;
+
+        // don't count filler rows at the bottom either.
+        var fillerRows :int = 0;
+        while (rowCount > 0 && listItems[rowCount - 1].length == 0)
+        {
+            if (collection && rowCount + offset >= collection.length) {
+                rowCount--;
+                fillerRows++;
+            } else {
+                break;
+            }
+        }
+
+        var colCount :int = listItems[0].length;
+        var oldHorizontalScrollBar :Object = horizontalScrollBar;
+        var oldVerticalScrollBar :Object = verticalScrollBar;
+        var roundedWidth :int = Math.round(unscaledWidth);
+        var length :int = collection ? collection.length - lockedRowCount : 0;
+        var numRows :int = rowCount - lockedRowCount;
+
+        setScrollBarProperties(Math.round(listContent.width), roundedWidth, length, numRows);
+        maxVerticalScrollPosition = Math.max(length - numRows, 0);
     }

     /**
@@ -265,6 +342,23 @@
         PopUpUtil.fitInRect(submenu, _fitting || screen);
     }

+    override protected function measure () :void
+    {
+        super.measure();
+
+        if (measuredHeight > this.maxHeight) {
+            measuredHeight = this.maxHeight;
+        }
+
+        if (verticalScrollPolicy == ScrollPolicy.ON || verticalScrollPolicy == ScrollPolicy.AUTO) {
+            if (verticalScrollBar) {
+                measuredMinWidth = measuredWidth = measuredWidth + verticalScrollBar.minWidth;
+            }
+        }
+
+        commitProperties();
+    }
+
     // from List
     override protected function makeListData (data :Object, uid :String, rowNum :int) :BaseListData
     {
@@ -316,5 +410,6 @@
     protected var _lefting :Boolean = false;
     protected var _upping :Boolean = false;
     protected var _fitting :Rectangle = null;
+    protected var _verticalScrollPolicy :String;
 }
 }


- forEach was returning the ExpiringElements, not the data.
- We shouldn't need to run checkTimer() on add(), generally.
  If adding the sole element, we can just schedule the expiration
  directly.
- Simplified and functionalized some other bits.

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

--- src/as/com/threerings/util/ExpiringSet.as
+++ src/as/com/threerings/util/ExpiringSet.as
@@ -35,6 +35,8 @@
     public function ExpiringSet (ttl :Number)
     {
         _ttl = Math.round(ttl * 1000);
+        _timer = new Timer(_ttl, 1);
+        _timer.addEventListener(TimerEvent.TIMER, checkTimer);
     }

     /**
@@ -44,12 +46,6 @@
     public function get ttl () :Number
     {
         return _ttl / 1000;
-    }
-
-    // from Set
-    public function isEmpty () :Boolean
-    {
-        return size() == 0;
     }

     /**
@@ -66,7 +62,7 @@
     public function forEach (fn :Function) :void
     {
         for each (var e :ExpiringElement in _data) {
-            fn(e);
+            fn(e.element);
         }
     }

@@ -77,14 +73,17 @@
     }

     // from Set
+    public function isEmpty () :Boolean
+    {
+        return size() == 0;
+    }
+
+    // from Set
     public function contains (o :Object) :Boolean
     {
-        for each (var e :ExpiringElement in _data) {
-            if (e.objectEquals(o)) {
-                return true;
-            }
-        }
-        return false;
+        return _data.some(function (e :ExpiringElement, ... ignored) :Boolean {
+            return e.objectEquals(o);
+        });
     }

     /**
@@ -95,13 +94,9 @@
     public function add (o :Object) :Boolean
     {
         var added :Boolean = true;
-        var element :ExpiringElement;
-        var expire :int = getTimer() + _ttl;
         for (var ii :int = 0; ii < _data.length; ii++) {
-            if ((_data[ii] as ExpiringElement).objectEquals(o)) {
-                // already contained - update expire time and remove from current position.
-                element = _data[ii] as ExpiringElement;
-                element.expirationTime = expire;
+            if (ExpiringElement(_data[ii]).objectEquals(o)) {
+                // already contained, remove this one and re-add at end
                 _data.splice(ii, 1);
                 added = false;
                 break;
@@ -110,8 +105,13 @@

         // push the item onto the queue. since each element has the same TTL, elements end up
         // being ordered by their expiration time.
-        _data.push(element || new ExpiringElement(o, expire));
-        checkTimer();
+        _data.push(new ExpiringElement(o, getTimer() + _ttl));
+        if (_data.length == 1) {
+            // set up the timer to remove this one element, otherwise it was already running
+            _timer.reset();
+            _timer.delay = _ttl;
+            _timer.start();
+        }
         return added;
     }

@@ -121,13 +121,11 @@
         // pull the item from anywhere in the queue.  If we remove the first element, the timer
         // will harmlessly NOOP when it wakes up
         for (var ii :int = 0; ii < _data.length; ii++) {
-            var e :ExpiringElement = _data[ii] as ExpiringElement;
-            if (e.objectEquals(o)) {
+            if (ExpiringElement(_data[ii]).objectEquals(o)) {
                 _data.splice(ii, 1);
                 return true;
             }
         }
-
         return false;
     }

@@ -137,56 +135,33 @@
      */
     public function toArray () :Array
     {
-        var elements :Array = [];
-        for each (var element :ExpiringElement in _data) {
-            elements.push(element.element);
-        }
-        return elements;
+        return _data.map(function (e :ExpiringElement, ... ignored) :Object {
+            return e.element;
+        });
     }

-    protected function checkTimer (...ignored) :void
+    /**
+     * Remove probably just one element from the front of the expiration queue, and
+     * schedule a wakeup for the time to the new head's expiration time.
+     */
+    protected function checkTimer (... ignored) :void
     {
-        // expiration check
         var now :int = getTimer();
-        while (headIsExpired(now)) {
-            // pop the head off the queue and dispatch an event
-            var head :ExpiringElement = _data.shift() as ExpiringElement;
-            dispatchEvent(new ValueEvent(ELEMENT_EXPIRED, head.element));
+        while (_data.length > 0) {
+            var e :ExpiringElement = ExpiringElement(_data[0]);
+            var timeToExpire :int = e.expirationTime - now;
+            if (timeToExpire <= 0) {
+                _data.shift(); // remove it
+                dispatchEvent(new ValueEvent(ELEMENT_EXPIRED, e.element)); // notify
+
+            } else {
+                // the head element is not yet expired
+                _timer.reset();
+                _timer.delay = timeToExpire;
+                _timer.start();
+                break;
+            }
         }
-
-        // empty check
-        if (isEmpty()) {
-            return;
-        }
-
-        // if the timer is already running, and we're not empty, we want to just let it finish
-        // its current delay, and set up a new one then
-        if (_timer != null && _timer.running) {
-            return;
-        }
-
-        // sanity check
-        var delay :int = (_data[0] as ExpiringElement).expirationTime - now;
-        if (delay <= 0) {
-            // blow up
-            log.warning("calculated delay after expiring elements is invalid! [" + delay + "]");
-            return;
-        }
-
-        // set up next delay
-        if (_timer == null) {
-            _timer = new Timer(delay, 1);
-            _timer.addEventListener(TimerEvent.TIMER, checkTimer);
-        } else {
-            _timer.delay = delay;
-            _timer.reset();
-        }
-        _timer.start();
-    }
-
-    protected function headIsExpired (now :int) :Boolean
-    {
-        return isEmpty() ? false : (_data[0] as ExpiringElement).isExpired(now);
     }

     protected static const log :Log = Log.getLog(ExpiringSet);
@@ -195,7 +170,7 @@
     protected /* final */ var _ttl :int;

     /** Array of ExpiringElement instances, sorted by expiration time. */
-    protected var _data :Array = new Array();
+    protected var _data :Array = [];

     protected var _timer :Timer;
 }
@@ -214,11 +189,6 @@
         this.expirationTime = expiration;
     }

-    public function isExpired (now :int) :Boolean
-    {
-        return expirationTime <= now;
-    }
-
     public function objectEquals (element :Object) :Boolean
     {
         return Util.equals(element, this.element);