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

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

 package mx.graphics
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23103
Author:   aharui@adobe.com
Date:     2011-10-24T17:55:27.694953Z

Log Message:
-----------
Fix early loading of resources when RSLs are in play

Notes: None
Doc notes: None
Bugs: SDK-30329
Reviewer: Darrell
Tests run: Checkintests, cyclone
Is noteworthy for integration: None

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as

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

--- frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
+++ frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as
@@ -118,10 +118,22 @@
     {
         super();

-		var info:Object = SystemManagerGlobals.info;
+        if (SystemManagerGlobals.topLevelSystemManagers.length)
+        {
+            if (SystemManagerGlobals.topLevelSystemManagers[0].currentFrame == 1)
+            {
+                ignoreMissingBundles = true;
+                SystemManagerGlobals.topLevelSystemManagers[0].
+                    addEventListener(Event.ENTER_FRAME, enterFrameHandler);
+            }
+        }
+
+        var info:Object = SystemManagerGlobals.info;
         if (info)
             processInfo(info, false);

+        ignoreMissingBundles = false;
+
         if (SystemManagerGlobals.topLevelSystemManagers.length)
 		    SystemManagerGlobals.topLevelSystemManagers[0].
 			    addEventListener(FlexEvent.NEW_CHILD_APPLICATION, newChildApplicationHandler);
@@ -133,6 +145,13 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     *
+     *  Whether or not to throw an error.
+     */
+    private var ignoreMissingBundles:Boolean;
+
     /**
      *  @private
      *
@@ -282,9 +301,12 @@
             {
                 var bundleName:String = bundleNames[j];

-                bundles[bundleCount++] = installCompiledResourceBundle(
+                var bundle:IResourceBundle = installCompiledResourceBundle(
                     applicationDomain, locale, bundleName,
                     useWeakReference);
+
+                if (bundle)
+                    bundles[bundleCount++] = bundle;
             }
         }

@@ -362,6 +384,9 @@

         if (!bundleClass)
         {
+            if (ignoreMissingBundles)
+                return null;
+
             throw new Error(
                 "Could not find compiled resource bundle '" + bundleName +
                 "' for locale '" + locale + "'.");
@@ -1094,6 +1119,26 @@
         }
     }

+    /**
+     *  @private
+     */
+    private function enterFrameHandler(event:Event):void
+    {
+        if (SystemManagerGlobals.topLevelSystemManagers.length)
+        {
+            if (SystemManagerGlobals.topLevelSystemManagers[0].currentFrame == 2)
+            {
+                SystemManagerGlobals.topLevelSystemManagers[0].
+                    removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
+            }
+            else
+                return;
+        }
+
+        var info:Object = SystemManagerGlobals.info;
+        if (info)
+            processInfo(info, false);
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20845
Author:   mhorn@adobe.com
Date:     2011-03-14T15:29:23.391952Z

Log Message:
-----------
merge 20756,20790,20712,20805

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodgeShader.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TabBar.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/StringUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="dir" action="M">/private/flex/sdk/trunk</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>

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

--- frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as
+++ frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as
@@ -14,33 +14,36 @@
     import flash.events.Event;
     import flash.events.EventDispatcher;

-	/**
-	 * OnDemandEventDispatcher serves as a base class for classes that dispatch events but expect listeners
-	 * to be infrequent.  When a class extends OnDemandEventDispatcher instead of the standard EventDispatcher,
-	 * it is trading off a small overhead on every single instance for a slightly larger overhead on only the instances
-	 * that actually have listeners attached to them.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
+    /**
+     * OnDemandEventDispatcher serves as a base class for classes that dispatch events but expect listeners
+     * to be infrequent.  When a class extends OnDemandEventDispatcher instead of the standard EventDispatcher,
+     * it is trading off a small overhead on every single instance for a slightly larger overhead on only the instances
+     * that actually have listeners attached to them.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
     public class OnDemandEventDispatcher implements IEventDispatcher
     {
         private var _dispatcher:EventDispatcher;

-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
     //
     //  Constructor
     //
     //--------------------------------------------------------------------------
+        /**
+         * Constructor.
+         */
         public function OnDemandEventDispatcher()
         {
         }

     /**
-     *  @copy flash.events.EventDispatcher#addEventListener
+     *  @inheritDoc
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -58,7 +61,7 @@

     /**
-     *  @copy flash.events.EventDispatcher#dispatchEvent
+     *  @inheritDoc
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -73,7 +76,7 @@
         }

     /**
-     *  @copy flash.events.EventDispatcher#hasEventListener
+     *  @inheritDoc
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -88,7 +91,7 @@
         }

     /**
-     *  @copy flash.events.EventDispatcher#removeEventListener
+     *  @inheritDoc
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -102,7 +105,7 @@
         }

     /**
-     *  @copy flash.events.EventDispatcher#willTrigger
+     *  @inheritDoc
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


Uncommented tearDown() code that no longer has problems after switching to AsUnit 4.

--- tests/org/osflash/signals/natives/NativeSignalTest.as
+++ tests/org/osflash/signals/natives/NativeSignalTest.as
@@ -26,9 +26,8 @@
 		[After]
 		public function tearDown():void
 		{
-			// tearDown() is getting called too early for some reason, so commenting out for now.
-			//clicked.removeAll();
-			//clicked = null;
+			clicked.removeAll();
+			clicked = null;
 		}

 		protected function verifyNoListeners():void


Fixed bug where bar chart axis tool tip was showing at zero for negative
numbers.  Stacked mode still only shows the positive value.

Change-Id: I493e373b55e689935e997237fd92597dcae2d63f

--- WeaveUI/src/weave/visualization/plotters/CompoundBarChartPlotter.as
+++ WeaveUI/src/weave/visualization/plotters/CompoundBarChartPlotter.as
@@ -721,6 +721,9 @@
 			if (allMissing)
 				tempRange.setRange(0, 0); // bar starts at zero

+			if (tempRange.end == 0)
+				tempRange.setRange(tempRange.end, tempRange.begin);
+
 			if (horizontalMode.value) // x range
 				bounds.setXRange(tempRange.begin, tempRange.end);
 			else // y range


Create Video element using 1920x960 resolution.

--- src/org/mangui/jwplayer/media/HLSProvider.as
+++ src/org/mangui/jwplayer/media/HLSProvider.as
@@ -152,12 +152,12 @@
             if (cfg.hasOwnProperty('stagevideo') && cfg['stagevideo'].toString() == "false") {
                 _stageEnabled = false;
             }
-            _video = new Video(320, 240);
+            _video = new Video(1920, 960);
             _video.smoothing = true;
             // Use stageVideo when available
             if (_stageEnabled && RootReference.stage.stageVideos.length > 0) {
                 _stageVideo = RootReference.stage.stageVideos[0];
-                _stageVideo.viewPort = new Rectangle(0, 0, 320, 240);
+                _stageVideo.viewPort = new Rectangle(0, 0, 1920, 960);
                 _stageVideo.attachNetStream(_hls.stream);
                 Log.info("stage video enabled");
             } else {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 142
Author:   proberts@adobe.com
Date:     2008-01-09T21:41:12.224334Z

Log Message:
-----------
Severity: ignore
Description: docs update -- fixing formatting of @mxml sections; also minor enhancements to FlexHTMLLoader class and member descriptions.

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/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/core/WindowedApplication.as
+++ frameworks/projects/airframework/src/mx/core/WindowedApplication.as
@@ -380,7 +380,7 @@
  *    title=""
  *    titleBarFactory="mx.core.ClassFactory"
  *    titleIcon="null"
- *
+ *
  *    Styles
  *    buttonAlignment="auto"
  *    buttonPadding="2"
@@ -400,12 +400,12 @@
  *    titleBarButtonPadding="5"
  *    titleBarColors="[ 0x000000, 0x000000 ]"
  *    titleTextStyleName="undefined"
- *
+ *
  *    Effects
  *    closeEffect="No default"
  *    minimizeEffect="No default"
  *    unminimizeEffect="No default"
- *
+ *
  *    Events
  *    applicationActivate="No default"
  *    applicationDeactivate="No default"


Transferred from the Adobe Open Source Subversion Repository

Revision: 1889
Author:   aharui@adobe.com
Date:     2008-05-29T23:41:13.178626Z

Log Message:
-----------
Fix bugs related to DragManager working better in compatibility mode. CursorManager should be working on compatibility mode and sandbox mode.

This code uses potential replacement scheme for addEventListenerToStage

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/marshall-plan-3.0.x/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/marshall-plan-3.0.x/frameworks/projects/framework/src/mx/events/MarshalMouseEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/marshall-plan-3.0.x/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/marshall-plan-3.0.x/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/marshall-plan-3.0.x/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/marshall-plan-3.0.x/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/marshall-plan-3.0.x/frameworks/projects/framework/src/mx/utils/EventUtil.as</path>

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

--- frameworks/projects/framework/src/mx/events/EventListenerRequest.as
+++ frameworks/projects/framework/src/mx/events/EventListenerRequest.as
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.events
+{
+	import flash.events.Event;
+	import flash.events.IEventDispatcher;
+
+	public class EventListenerRequest extends SandboxBridgeRequest
+	{
+	   /**
+	    * Request an application in another sandbox or compiled with a different
+	    * version of Flex to add a listener to a specified event on your behalf.
+	    * When the requestee is notified the event has occurred
+	    * in its domain, the message is sent to the requestor over the
+	    * requestor bridge passed in the original request.
+	    *
+	    * @sendTo parent and/or children
+	    * @reply  none
+	    */
+		public static const ADD:String = "mx.managers.SystemManager.addEventListener";
+		public static const REMOVE:String = "mx.managers.SystemManager.removeEventListener";
+
+		private var _type:String;
+		private var _useCapture:Boolean;
+		private var _priority:int;
+		private var _useWeakReference:Boolean;
+        private var _useStage:Boolean;
+
+		/**
+		 * Create a new addEventListener request.
+		 *
+		 * @param userType type of message your would normally pass to
+		 * 		  addEventListener.
+		 * @param useCapture, as in addEventListener.
+		 * @param priority, as in addEventListener.
+		 * @param useWeakReference, as in addEventListener.
+		 * @param useStage true if a stage listener listener should be added
+		 *        if this request is sent to a top-level system manager.
+		 * @param requestor the bridge of the original requestor of the listener.
+		 * 		  Events should be sent to this bridge.
+		 * @param data optional parameter, not used
+		 * @param currentRequestor the bridge that passed this request to the
+		 *        requestee. This differs from requestor when an event is
+		 * 	      broadcast. The currentRequestor does not expect to receive
+		 * 		  any events from the request, it is just acting as a relay to
+		 *        broadcast the event.
+		 */
+		public function EventListenerRequest(requestType:String,
+									userType:String,
+									useCapture:Boolean = false,
+									priority:int = 0,
+									useWeakReference:Boolean = false)
+
+		{
+			super(requestType, false, false);
+			_type = userType;
+			_useCapture = useCapture;
+			_priority = priority;
+			_useWeakReference = useWeakReference;
+		}
+
+		public function get userType():String
+		{
+			return _type;
+		}
+
+		public function get useCapture():Boolean
+		{
+			return _useCapture;
+		}
+
+
+		public function get priority():int
+		{
+			return _priority;
+		}
+
+		public function get useWeakReference():Boolean
+		{
+			return _useWeakReference;
+		}
+
+
+		override public function clone():Event
+		{
+			return new EventListenerRequest(type, userType, useCapture, priority,
+								useWeakReference);
+		}
+
+		public static function marshal(event:Event):Event
+		{
+			var eventObj:Object = event;
+			return new EventListenerRequest(eventObj.type, eventObj.userType, eventObj.useCapture,
+								eventObj.priority, eventObj.useWeakReference);
+		}
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19931
Author:   jasonsj@adobe.com
Date:     2011-01-25T19:19:28.281950Z

Log Message:
-----------
Part 1 Mobile Theme P-ARB

MobileSkin removes beginChromeColorFill and drawChromeColor. updateDisplayList instead calls layoutContents and drawBackground. Skins implement chromeColor logic in drawBackground.

ActionBar adds defaultButtonAppearance style with values normal|beveled. Use beveled for iOS-styled buttons.

Refactored concrete skins to spark.skins.mobile. All other base/support classes are moved to spark.skins.mobile.supportClasses.

ButtonSkinBase adds useCenterAlignment for ascent and icon centering. Buttons that use iconPlacement top/bottom should disable useCenterAlignment for proper constraining of icons and labels to top and bottom constraints.

CheckBox and RadioButton now left align.

QE notes: Custom skins based on MobileSkin will need to be updated.
Height of Buttons using iconPlacement top/bottom will be shorter.
Height of Buttons with icons greater than the minHeight per DPI at 240 will be 1px taller.
Doc notes: API changes in spark.skins.mobile.MobileSkin and sub-classes
Bugs:
SDK-29167 Adding padding styles to ActionBar for easier platform-specific styling
SDK-29093 CheckBox and RadioButton should always left align
SDK-29187 Incorrect label alignment in mobile Button skin with iconPlacement="top"
SDK-29193 Button label should be ascent centered when using iconPlacement top and bottom when no icon is present
SDK-29167 Adding padding styles to ActionBar for easier platform-specific styling
Reviewer: mcho, gruehle, rfrishbe
Tests run: checkintests, mobile cyclone
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ActionBarDefaultButtonAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as</path>

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

--- frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as
+++ frameworks/projects/mobilecomponents/src/MobileComponentsClasses.as
@@ -25,5 +25,6 @@
  */
     import spark.preloaders.SplashScreen; SplashScreen;
     import spark.components.supportClasses.StyleableTextField; StyleableTextField;
+    import spark.components.ActionBarDefaultButtonAppearance; ActionBarDefaultButtonAppearance;
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 2464
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:50:33.449468Z

Log Message:
-----------
add flex 4 to trunk

Modified Paths:
--------------
134 paths were modified

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

--- frameworks/projects/spark/src/spark/events/ElementExistenceEvent.as
+++ frameworks/projects/spark/src/spark/events/ElementExistenceEvent.as
@@ -0,0 +1,141 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package flex.events
+{
+
+import flash.events.Event;
+
+/**
+ *  Represents events that are dispatched when an item of a Group
+ *  is created or destroyed.
+ */
+public class ItemExistenceChangedEvent extends Event
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  The ItemExistenceChangedEvent.ITEM_ADD constant
+	 *  defines the value of the type property of the event
+	 *  object for an itemAdd event.
+	 *
+     *
The properties of the event object have the following values:

+	 *

+	 *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

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

+	 *
relatedObject	Contains a reference
+     *         to the item that was created.

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

+	 *

+	 *
+     *  @eventType itemAdd
+	 */
+	public static const ITEM_ADD:String = "itemAdd";
+
+	/**
+	 *  The ItemExistenceChangedEvent.ITEM_REMOVE constant
+	 *  defines the value of the type property of the event
+	 *  object for an itemRemove event.
+	 *
+     *
The properties of the event object have the following values:

+	 *

+	 *
Property	Value

+     *
bubbles	false

+     *
cancelable	false

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

+	 *
relatedObject	Contains a reference
+     *        to the item that is about to be removed.

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

+	 *

+	 *
+     *  @eventType itemRemove
+	 */
+	public static const ITEM_REMOVE:String = "itemRemove";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param type The event type; indicates the action that caused the event.
+	 *
+	 *  @param bubbles Specifies whether the event can bubble up the display list hierarchy.
+	 *
+	 *  @param cancelable Specifies whether the behavior associated with the event can be prevented.
+	 *
+	 *  @param relatedObject Reference to the item that was created or destroyed.
+	 */
+	public function ItemExistenceChangedEvent(
+								type:String, bubbles:Boolean = false,
+								cancelable:Boolean = false,
+								relatedObject:* = undefined)
+	{
+		super(type, bubbles, cancelable);
+
+		this.relatedObject = relatedObject;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  relatedObject
+	//----------------------------------
+
+	/**
+	 *  Reference to the item that was created or destroyed.
+	 */
+	public var relatedObject:*;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: Event
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+    override public function clone():Event
+    {
+        return new ItemExistenceChangedEvent(type, bubbles, cancelable,
+                                             relatedObject);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18514
Author:   dthakkar@adobe.com
Date:     2010-11-10T00:38:39.528767Z

Log Message:
-----------
QE notes: Some testcases in spark formatters are failing because of behavior change. These testcases are excluded prior to submission. Globalization QE team has been informed about this.
Doc notes: Spark Formatters ASDocs are updated and also added samples for the spark formatters.
Bugs: SDK-28145, SDK-28345 ,SDK-28320 ,SDK-28287,SDK-28314
Reviewer: Gordon , Craig, Masa, Xie
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/MatchingCollatorExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/CurrencyValidatorTestScript.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/NumberValidatorTests.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/CurrencyValidatorTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample1.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample1.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/bundles/en_US/validators.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/SortingCollator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/SortingCollatorExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/globalization/StringToolsExample.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/IValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationValidatorBase.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/NumberFormatterExample2.mxml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/CurrencyFormatterExample2.mxml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/NumberValidator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/CurrencyValidator.as</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/validators/Validator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/GlobalizationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/formatters/IFormatter.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/asdoc/en_US/spark/formatters/examples/DateTimeFormatterExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/LastOperationStatus.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/formatters/supportClasses/NumberFormatterBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/MatchingCollator.as</path>

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

--- frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as
+++ frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as
@@ -19,39 +19,46 @@
 import mx.core.mx_internal;
 import mx.formatters.IFormatter;

-import spark.formatters.supportClasses.NumberBase;
+import spark.formatters.supportClasses.NumberFormatterBase;
 import spark.globalization.LastOperationStatus;
+import mx.resources.ResourceManager;
+import mx.resources.IResourceManager;

 use namespace mx_internal;
+
+[ResourceBundle("core")]

 /**
  *  The CurrencyFormatter class provides locale-sensitive formatting
- *  and parsing of currency values. It can format currency amounts stored in
- *  Number objects.
+ *  and parsing of currency values.
  *
  *
This class is a wrapper class around the
- *  flash.globalization.CurrencyFormatter. Therefore
+ *  flash.globalization.CurrencyFormatter. Therefore,
  *  the locale-specific formatting
  *  is provided by the flash.globalization.CurrencyFormatter.
- *  However this CurrencyFormatter class can be used in mxml declartions,
+ *  However, this CurrencyFormatter class can be used in MXML declartions,
  *  uses the locale style for the requested Locale ID name, and has
  *  methods and properties that are bindable.
  *

  *  The flash.globalization.CurrencyFormatter class uses the underlying
  *  operating system for the formatting functionality and
  *  to supply the locale specific data. On some operating systems,
- *  the flash.globalization classes are unsupported, this wrapper
- *  class provides a fallback functionality in this case.
+ *  the flash.globalization classes are unsupported, on these systems this
+ *  wrapper class provides fallback functionality.
  *

  *
+ *  @includeExample examples/CurrencyFormatterExample1.mxml
+ *  @includeExample examples/CurrencyFormatterExample2.mxml
+ *
  *  @see flash.globalization.CurrencyFormatter
+ *  @see NumberFormatter
  *
  *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
+ *  @playerversion Flash 10.1
+ *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
-public class CurrencyFormatter extends NumberBase implements IFormatter
+public class CurrencyFormatter extends NumberFormatterBase implements IFormatter
 {
     include "../core/Version.as";

@@ -78,7 +85,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  Constructs a new CurrencyFormatter object to format numbers
+     *  Constructs a new CurrencyFormatter object to format numbers
      *  representing currency amounts according to
      *  the conventions of a given locale.
      *

@@ -86,43 +93,51 @@
      *  locale style can be set in several ways:
      *

      *

-     *
         *
-     *  Inheriting the style from a UIComponent by calling the
-     *  UIComponent's addStyleClient method.
-     *

      *

-     *  By using the class in an mxml declaration and inheriting the
+     *  By using the class in an MXML declaration and inheriting the
      *  locale from the document that contains the declaration.
      *

+     *  Example:
      *  <listing version="3.0" >
-     *  <fx:Declarations>
-     *         <s:StringTools id="st" />
+     *  <fx:Declarations>

+     *         <s:CurrencyFormatter id="cf" />

      *  </fx:Declarations>
      *  </listing>
      *

-     *  By using an mxml declaration and specifying the locale value
+     *  By using an MXML declaration and specifying the locale value
      *  in the list of assignments.
      *

+     *  Example:
      *  <listing version="3.0" >
-     *  <fx:Declarations>
-     *      <s:StringTools id="st_turkish" locale="tr-TR" />
+     *  <fx:Declarations>

+     *      <s:CurrencyFormatter id="cf_Japanese" locale="ja-JP" />

      *  </fx:Declarations>
      *  </listing>
      *

      *  Calling the setStyle method,
-     *  e.g. st.setStyle("locale", "tr-TR")
+     *  e.g. cf.setStyle("locale", "ja-JP")
+     *

+     *

+     *  Inheriting the style from a UIComponent by calling the
+     *  UIComponent's addStyleClient() method.
      *

      *

      *

      *  If the locale style is not set by one of the above techniques,
      *  the methods of this class that depend on the locale
-     *  will throw an error.
-     *
         *
-     *
Certain properties such as the currencySymbol
-     *  and currencyISOCode properties are set
-     *  automatically based on the locale.

-     *
-     *
NOTE: When a fallback locale is used the currency
+     *  will set lastOperationStatus to
+     *  LastOperationStatus.LOCALE_UNDEFINED_ERROR
+     *  and depending on the return type the methods will return
+     *  null, 0, or undefined.

+     *
+     *
Most of the properties of
+     *  this class are automatically set based on the locale style. If the
+     *  locale style is changed, any properties that have not been explicitly
+     *  set will also be updated based on the new locale. Note that the
+     *  actual locale that is used is specified by the actualLocaleIDName
+     *  property.

+     *
+     *
NOTE: When a fallback locale is used, the currency
      *  properties are set to default values,
      *  and therefore the currencySymbol or
      *  currencyISOCode properties might be given unexpected
@@ -131,12 +146,13 @@
      *  property values before formatting a currency amount.
      *

      *
-     *  @see actualLocaleIDName
-     *
+     *  @see #actualLocaleIDName
+     *  @see #lastOperationsStatus
+     *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
-     *  @productversion Flash CS5
      */
     public function CurrencyFormatter()
     {
@@ -149,6 +165,12 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     */
+    private var resourceManager:IResourceManager =
+        ResourceManager.getInstance();
+
     /**
      *  @private
      */
@@ -177,9 +199,9 @@
      *  @see flash.globalization.CurrencyFormatter.actualLocaleIDName
      *  @see #CurrencyFormatter()
      *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flash CS5
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     override public function get actualLocaleIDName():String
@@ -214,27 +236,32 @@

     /**
      *  The three letter ISO 4217 currency code for the actual locale
-     *  being used.
-     *
-     *
This code is used to determine the currency symbol or
-     *  string when formatting currency amounts
-     *  using the format() method with
-     *  the useCurrencySymbol property set to
-     *  false.

-     *
-     *
This property is initialized by the constructor
+     *  being used (e.g. USD, EUR, JPY, CNY).
+     *
+     *
When the useCurrencySymbol property is set to
+     *  false, this code will be used to indicate the currency
+     *  type when formatting currency amounts
+     *  using the format() method.

+     *
+     *
This property is initialized when the locale style is set
      *  based on the actual locale that is used. When a fallback
-     *  locale is used this property reflects the preferred, default
+     *  locale is used, this property reflects the preferred/default
      *  currency code for the fallback locale.

      *
-     *  @default dependent on the actual locale and operating system
-     *
+     *  @throws TypeError if this property is assigned a null value.
+     *
+     *
The default value is dependent on the actual locale and operating
+     *  system.

+     *
+     *  @see #actualLocaleIDName
      *  @see #format()
      *  @see #currencySymbol
-     *
+     *  @see #formattingWithCurrencySymbolIsSafe()
+     *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @playerversion AIR 2
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get currencyISOCode():String
     {
@@ -266,7 +293,12 @@
         else
         {
             if (!value)
-                throw new TypeError();
+            {
+                const message:String =
+                    resourceManager.getString("core","nullParameter",
+                        [ currencyISOCode ]);
+                throw new TypeError(message);
+            }

             if (properties)
                 properties.currencyISOCode = value;
@@ -290,21 +322,26 @@
      *  the withCurrencySymbol parameter set to
      *  true.

      *
-     *
This property is initialized by the constructor based on
+     *
This property is initialized when the locale style is set based on
      *  the actual locale that is used. When a fallback
-     *  locale is used this property reflects the preferred, default
-     *  currency symbol for the fallback locale.

-     *
-     *  @default dependent on the actual locale and operating system
-     *
+     *  locale is used, this property reflects the preferred/default
+     *  currency symbol for the fallback locale which may be different
+     *  then the locale style.

+     *
+     *  @throws TypeError if this property is assigned a null value.
+     *
+     *
The default value is dependent on the actual locale and operating
+     *  system.

+     *
+     *  @see #actualLocaleIDName
      *  @see #format()
-     *  @see #setCurrency()
-     *  @see #formattingWithCurrencySymbolIsSafe
+     *  @see #formattingWithCurrencySymbolIsSafe()
      *  @see #currencyISOCode
      *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @playerversion AIR 2
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get currencySymbol():String
     {
@@ -336,7 +373,12 @@
         else
         {
             if (!value)
-                throw new TypeError();
+            {
+                const message:String =
+                    resourceManager.getString("core","nullParameter",
+                        [ currencySymbol ]);
+                throw new TypeError(message);
+            }

             if (properties)
                 properties.currencySymbol = value;
@@ -355,7 +397,7 @@
                         enumeration="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15")]

     /**
-     *   A numeric value that indicates a formatting pattern for negative
+     *  A numeric value that indicates a formatting pattern for negative
      *  currency amounts. This pattern defines the location of the
      *  currency symbol and the negative symbol or parentheses in
      *  relation to the numeric portion of the currency
@@ -452,30 +494,35 @@
      *

      *

      *
-     *  @default dependent on the actual locale and operating system
-     *
      *  @throws ArgumentError if the assigned value is not between 0 and 15.
-     *
+     *
+     *
The default value is dependent on the actual locale and operating
+     *  system.

+     *
      *  @see #format()
      *  @see #currencySymbol
      *  @see #negativeSymbol
      *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @playerversion AIR 2
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function get negativeCurrencyFormat():int
+    public function get negativeCurrencyFormat():uint
     {
         return getBasicProperty(properties, NEGATIVE_CURRENCY_FORMAT);
     }

-    public function set negativeCurrencyFormat(value:int):void
+    public function set negativeCurrencyFormat(value:uint):void
     {
         if (!g11nWorkingInstance)
         {
             if ((value < 0) || (15 < value))
-                throw new TypeError();
+            {
+                const message:String =
+                    resourceManager.getString("core","badIndex");
+                throw new ArgumentError(message);
+            }
         }

         setBasicProperty(properties, NEGATIVE_CURRENCY_FORMAT, value);
@@ -489,11 +536,11 @@
     [Inspectable(category="General", enumeration="0,1,2,3")]

     /**
-     *    A numeric value that indicates a formatting pattern for positive
-     *  currency amounts. This format defines the location of currency symbol
-     *  relative to the numeric portion of the currency amount.
-     *
-     *
The value of this property must be one of the constants
+     *  A numeric value that indicates a formatting pattern for positive
+     *  currency amounts. This format defines the location of the currency
+     *  symbol relative to the numeric portion of the currency amount.
+     *
+     *
The value of this property must be one of the constants
      *  defined in the table below.
      *

      *
@@ -537,27 +584,32 @@
      *
      *  @throws ArgumentError if the assigned value is not between 0 and 3.
      *
-     *  @default dependent on the actual locale and operating system
+     *
The default value is dependent on the actual locale and operating
+     *  system.

      *
      *  @see #currencySymbol
      *  @see #format()
      *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @playerversion AIR 2
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function get positiveCurrencyFormat():int
+    public function get positiveCurrencyFormat():uint
     {
         return getBasicProperty(properties, POSITIVE_CURRENCY_FORMAT);
     }

-    public function set positiveCurrencyFormat(value:int):void
+    public function set positiveCurrencyFormat(value:uint):void
     {
         if (!g11nWorkingInstance)
         {
             if ((value < 0) || (4 < value))
-                throw new TypeError();
+            {
+                const message:String =
+                    resourceManager.getString("core","badIndex");
+                throw new ArgumentError(message);
+            }
         }

         setBasicProperty(properties, POSITIVE_CURRENCY_FORMAT, value);
@@ -586,17 +638,17 @@
      *
      *
When the withCurrencySymbol property is set to
      *  false, the value of the currencyISOCode
-     *  property is used in the string returned by the format method.
-     *  For example: USD 123456789.22

+     *  property is used in the string returned by the format
+     *  method. For example: USD 123,456,789.22

      *
      *  @default false
      *
-     *  @see #formattingWithCurrencySymbolIsSafe
-     *  @see #format
-     *
+     *  @see #formattingWithCurrencySymbolIsSafe()
+     *  @see #format()
+     *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @playerversion AIR 2
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get useCurrencySymbol():Boolean
@@ -620,6 +672,10 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     */
+    private var defaultCurrencyISOCode:String = null;
     /**
      *  @private
      */
@@ -648,6 +704,8 @@
                                     != LastOperationStatus.UNSUPPORTED_ERROR))
         {
             properties = g11nWorkingInstance;
+            //preserve the default currencyISOCode for the locale
+            defaultCurrencyISOCode=properties.currencyISOCode;
             propagateBasicProperties(g11nWorkingInstance);

             if (currencySymbolOverride)
@@ -688,83 +746,102 @@
     /**
      *  Creates a string representing a currency amount formatted
      *  according to the current properties of this CurrencyFormatter object,
-     *  including the locale, currency symbol, and currency ISO code,
-     *  useCurrencySymbol
-     *
-     *
By default this method uses the currencyISOCode
-     *  property to determine the currency symbol and other
-     *  settings used when formatting.

+     *  including the locale, useCurrencySymbol, the currencySymbol or
+     *  the currencyISOCode.
+     *
+     *
The useCurrencySymbol property determines whether the
+     *  format method will use the currencySymbol or the
+     *  currencyISOCode in the
+     *  formatted currency amount. The default value for
+     *  useCurrencySymobl is false
+     *  and thus by default currency amounts will be formatted with the
+     *  currencyISOCode

      *
      *
Many countries and regions use the same currency symbols for
      *  different currencies.
-     *  For example the United States, Australia, New Zealand, Canada,
+     *  For example, the United States, Australia, New Zealand, Canada,
      *  and Mexico all use the same dollar sign symbol ($) for local
      *  currency values. When the formatting currency differs
      *  from the user's local currency it is best to use the ISO code as
      *  the currency string.
      *  You can use the formattingWithCurrencySymbolIsSafe()
-     *  method to test whether the ISO code of the
-     *  currency to be formatted matches the currencyISOCode
-     *  property of the formatter.
+     *  method to test whether or the ISO code of the
+     *  currency to be formatted matches the  default currency ISO code
+     *  for the actual locael used by the formatter.
      *

      *
      *
This method can format numbers of very large and very small
-     *  magnitudes. However the number of significant digits is
+     *  magnitudes. However, the number of significant digits is
      *  limited to the precision provided by the Number data type.
      *

-     *
-     *  @param value The numeric value to be formatted into a currency string.
-     *  @param withCurrencySymbol When set to false the
-     *  currencyISOCode property determines which
-     *  currency string or symbol to use in the output string. When
-     *  set to true, the current value of the
-     *  currencySymbol property is used in the output string.
-     *
-     *  @example  In this example the requested locale is
-     *  fr-CA French (Canada). The example assumes that this locale
+     *
+     *
If there is an error when formatting, due to an illegal input value
+     *  or other error, by default the format() method will
+     *  return null. However if the errorText property
+     *  is non-null, then the value of the errorText property will
+     *  be returned. The lastOperationStatus property will be
+     *  set to indicate the error that occurred.

+     *
+     *
+     *  @param value An object that contains the numeric value to be formatted
+     *  into a currency string. If the
+     *  object is not a Number then it will be converted
+     *  to a number using the Number() conversion function.
+     *
+     *  @example  In this example the locale style is set to
+     *  fr-CA [French (Canada)]. The example assumes that this locale
      *  is supported in the user's operating system and therefore
      *  no fallback locale is used.
-     *  For fr-CA the default currency is Canadian dollars with an
+     *  For fr-CA, the default currency is Canadian dollars with an
      *  ISO code of CAD. Therefore when formatting a currency
-     *  with the default values, CAD is used as the currency symbol. When
-     *  the withCurrencySymbol parameter is set to
-     *  true the currencySymbol
+     *  with the default values, CAD is used as the currency symbol. However
+     *  when the useCurrencySymbol property is set to
+     *  true, the currencySymbol
      *  property is used to format the currency amount.
      *
      *  <listing version="3.0" >
-     *  var cf:CurrencyFormatter = new CurrencyFormatter("fr-CA");
-     *
-     *  trace(cf.actualLocaleIDName);               // "fr-CA"
-     *  trace(cf.currencyISOCode);                // "CAD"
-     *  trace(cf.currencySymbol);                // "$"
-     *
-     *  trace(cf.format(1254.56));                // "1 254,56 CAD"
-     *  trace(cf.format(1254.56, true));            // "1 254,56 $"
+     *  <fx:Declarations>
+     *    <s:CurrencyFormatter id="cf_use_ISOCode" locale="fr-CA" />
+     *    <s:CurrencyFormatter id="cf_use_Symbol" locale="fr-CA"
+     *                       useCurrencySymbol="true" />
+     *  </fx:Declarations>
+     *

+     *  <s:VGroup>
+     *    <!-- label will use ISO code: 1,234,567.89 CAD -->
+     *    <s:Label text="{cf_use_ISOCode.format(1234567.89)}" />
+     *    <!-- label will use currency symbol: 1,234,567.89 $ -->
+     *    <s:Label text="{cf_use_Symbol.format(1234567.89)}" />
+     *  </s:VGroup>
+     *
      *  </listing>
      *
      *
The second example shows a method of formatting a currency
      *  amount in Canadian dollars using the default user's locale.
      *  The formattingWithCurrencySymbolIsSafe() method
-     *  is used to test to see if the user's default currency is
-     *  Canadian dollars and if so then the format method is used with
-     *  the withCurrencySymbol parameter set to true.
-     *  Otherwise the currency is set to Canadian dollars with
-     *  a more descriptive currency symbol. The example shows how
-     *  the currency would be formatted if the default locale was either
-     *  French (Canada) or English (USA).

+     *  is used to set the value of useCurrencySymbol
+     *  property. If the user's default locale is Canada (e.g.
+     *  fr-CA or en-CA), then the default currency symbol for Canada
+     *  will be used. If there is some locale is the default, then the
+     *  currencyISOCode of CAD will be used in the formatted currency
+     *  amount.

      *
      *  <listing version="3.0" >
-     *  var cf:CurrencyFormatter = new CurrencyFormatter(LocaleID.DEFAULT);
-     *
-     *  if (cf.formattingWithCurrencySymbolIsSafe("CAD")) {
-     *   trace(cf.actualLocaleIDName);     // "fr-CA French (Canada)"
-     *   trace(cf.format(1254.56, false)); // "1 254,56 $"
-     *  }
-     *  else {
-     *   trace(cf.actualLocaleIDName);     // "en-US English (USA)"
-     *   cf.setCurrency("CAD", "C$")
-     *   trace(cf.format(1254.56, true));  // "C$ 1,254.56"
-     *  }
+     *  <fx:Declarations>
+     *   <s:CurrencyFormatter id="cf_CAD" locale="{LocaleID.DEFAULT}"
+     *    currencyISOCode="CAD"
+     *    useCurrencySymbol="{cf_CAD.formattingWithCurrencySymbolIsSafe('CAD')}"
+     *   />
+     *  </fx:Declarations>
+     *

+     *  <fx:Script>
+     *  <![CDATA[
+     *      import flash.globalization.LocaleID;
+     *  ]]>
+     *  </fx:Script>
+     *

+     *  <!-- label will use ISO code or currency symbol depending on
+     *          user's default locale -->
+     *  <s:Label text="{cf_CAD.format(1234567.89)}" />
      *  </listing>
      *
      *  @return A string containing the formatted currency value.
@@ -773,12 +850,14 @@
      *  @see #currencyISOCode
      *  @see #formattingWithCurrencySymbolIsSafe()
      *  @see #lastOperationStatus
-     *  @see LastOperationStatus
-     *
+     *  @see #useCurrencySymbol
+     *  @see spark.formatters.supportClasses.NumberFormatterBase#errorText
+     *  @see spark.globalization.LastOperationStatus
+     *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
-     *  @productversion Flash CS5
      */
     public function format(value:Object):String
     {
@@ -813,7 +892,7 @@
             const retVal:String = g11nFormatter.format(
                                                     number, useCurrencySymbol);

-            return errorText && LastOperationStatus.isFatalError(
+            return errorText && LastOperationStatus.isError(
                         g11nFormatter.lastOperationStatus) ? errorText : retVal;
         }

@@ -849,14 +928,15 @@
      *  different from the user's default).

      *
      *
This method compares the requestedISOCode
-     *  parameter against the current currencyISOCode property,
+     *  parameter against the acutal locale's default
+     *  currencyISOCode,
      *  returning true if the strings are
      *  equal and false if they are not.
      *  When the strings are equal, using the format()
      *  method with the
      *  useCurrencySymbol property set to true
      *  results in a formatted currency value string
-     *  with a unique currency symbol for the locale.
+     *  with a currency symbol that is used in the current locale.
      *  If this method returns false, then using the format()
      *  method with the useCurrencySymbol
      *  property set to true could result in the use of an ambiguous
@@ -870,26 +950,38 @@
      *  @throws TypeError if the requestedISOCode parameter
      *  is null.
      *
-     *  @return true if the currencyISOCode
-     *  property matches the requestedISOCode parameter;
+     *  @return true if the default currencyISOCode
+     *  for the locale corresponding to the actualLocaleIDName
+     *  matches the requestedISOCode parameter;
      *  otherwise false.
      *
+     *  @see #actualLocaleIDName
      *  @see #currencySymbol
      *  @see #currencyISOCode
      *  @see #useCurrencySymbol
      *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @playerversion AIR 2
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function formattingWithCurrencySymbolIsSafe(
                                                 requestedISOCode:String):Boolean
     {
+        if (!requestedISOCode)
+        {
+            const message:String =
+                resourceManager.getString("core","nullParameter",
+                    [ requestedISOCode ]);
+            throw new TypeError(message);
+        }
+
         if (g11nWorkingInstance)
         {
-            return g11nWorkingInstance.formattingWithCurrencySymbolIsSafe(
-                                                            requestedISOCode);
+            //this is intentional to set lastoperation status to no_error
+            (g11nWorkingInstance as
+                flash.globalization.CurrencyFormatter).fractionalDigits =
+                    g11nWorkingInstance.fractionalDigits;
         }

         if ((localeStyle === undefined) || (localeStyle === null))
@@ -901,7 +993,7 @@

         fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;

-        return requestedISOCode == currencyISOCode;
+        return requestedISOCode == defaultCurrencyISOCode;
     }

     [Bindable("change")]
@@ -915,7 +1007,7 @@
      *  values of the negativeCurrencyFormat and
      *  positiveCurrencyFormat properties to determine
      *  the location of the currency symbol or string relative to the
-     *  currency amount.For negative amounts the value of the
+     *  currency amount. For negative amounts the value of the
      *  negativeCurrencyFormat property determines the
      *  location of the negative symbol and whether parentheses are used.

      *
@@ -926,10 +1018,12 @@
      *
      *

      *
The value property of the returned
-     *       CurrencyParseResult object is set to NaN.

+     *       CurrencyParseResult object is set to
+     *       NaN.

      *
The currencyString property of the returned
      *       CurrencyParseResult object is set to null.

-     *
The lastOperationStatus property is set to
+     *
The lastOperationStatus property is set to
+     *   LastOperationStatus.PARSE_ERROR
      *       indicate that parsing failed.

      *

      *
@@ -951,14 +1045,14 @@
      *
      *  @throws TypeError if the inputString parameter is null.
      *
-     *  @see #decimalSeparator
+     *  @see spark.formatters.supportClasses.NumberFormatterBase#decimalSeparator
      *  @see #negativeCurrencyFormat
      *  @see #positiveCurrencyFormat
      *  @see flash.globalization.CurrencyParseResult
      *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @playerversion AIR 2
-     *  @langversion 3.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public  function parse(inputString:String):CurrencyParseResult
@@ -975,16 +1069,23 @@

         fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;

-        // TODO Implement some kind of simple parsing.
-        return fallbackParseCurrency(inputString);
-    }
-
-    /**
-     *  @copy spark.utils.Collator#getAvailableLocaleIDNames
-     *
+        const currency:CurrencyParseResult = fallbackParseCurrency(inputString);
+
+        fallbackLastOperationStatus = isNaN(currency.value) ?
+                LastOperationStatus.PARSE_ERROR : LastOperationStatus.NO_ERROR;
+
+        return currency;
+    }
+
+    /**
+     *  Lists all of the locale ID names supported by this class.
+     *
+     *  @return A vector of strings containing all of the locale ID names
+     *         supported by this class and operating system.
+     *
+     *  @langversion 3.0
      *  @playerversion Flash 10.1
-     *  @langversion 3.0
-     *  @productversion Flash CS5
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     static public function getAvailableLocaleIDNames():Vector.<String>
@@ -1025,7 +1126,8 @@
                 currencyISOCode: "USD",
                 currencySymbol: "$"
             };
-
+
+        defaultCurrencyISOCode= "USD";
         if (currencySymbolOverride)
             properties.currencySymbol = currencySymbolOverride;


Enable animation effect for page changing of ScrollPane.

--- source/fairygui/ScrollPane.as
+++ source/fairygui/ScrollPane.as
@@ -445,8 +445,7 @@

 		public function set currentPageX(value:int):void
 		{
-			if (_pageMode && _overlapSize.x>0)
-				this.setPosX(value * _pageSize.x, false);
+			setCurrentPageX(value, false);
 		}

 		public function get currentPageY():int
@@ -463,8 +462,19 @@

 		public function set currentPageY(value:int):void
 		{
+			setCurrentPageY(value, false);
+		}
+
+		public function setCurrentPageX(value:int, ani:Boolean):void
+		{
+			if (_pageMode && _overlapSize.x>0)
+				this.setPosX(value * _pageSize.x, ani);
+		}
+
+		public function setCurrentPageY(value:int, ani:Boolean):void
+		{
 			if (_pageMode && _overlapSize.y>0)
-				this.setPosY(value * _pageSize.y, false);
+				this.setPosY(value * _pageSize.y, ani);
 		}

 		public function get isBottomMost():Boolean
@@ -692,9 +702,9 @@
 			if (_pageController == c)
 			{
 				if (_scrollType == ScrollType.Horizontal)
-					this.currentPageX = c.selectedIndex;
-				else
-					this.currentPageY = c.selectedIndex;
+					this.setCurrentPageX(c.selectedIndex, true);
+				else
+					this.setCurrentPageY(c.selectedIndex, true);
 			}
 		}


verion 3.8.4.rc1

verion 3.8.4.rc1

--- kdp3Lib/src/com/kaltura/kdpfl/ApplicationFacade.as
+++ kdp3Lib/src/com/kaltura/kdpfl/ApplicationFacade.as
@@ -34,7 +34,7 @@
 		 */

-		public var kdpVersion : String = "v3.8_vast3";
+		public var kdpVersion : String = "v3.8.4.rc1";


Nate points out these handy XmlUtil parameters - let's use em.

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

--- src/as/com/threerings/cast/PriorityOverride.as
+++ src/as/com/threerings/cast/PriorityOverride.as
@@ -49,19 +49,13 @@
     {
         var override :PriorityOverride = new PriorityOverride;
         override.renderPriority = XmlUtil.getIntAttr(xml, "renderPriority");
-        if (XmlUtil.hasAttribute(xml, "action")) {
-            override.action = XmlUtil.getStringAttr(xml, "action");
-        }
-
-        if (XmlUtil.hasAttribute(xml, "component")) {
-            override.component = XmlUtil.getStringAttr(xml, "component");
-        }
-
-        if (XmlUtil.hasAttribute(xml, "orients")) {
-            override.orients = Sets.newSetOf(int);
-            for each (var orient :int in toOrientArray(XmlUtil.getStringAttr(xml, "orients"))) {
-                override.orients.add(orient);
-            }
+        override.action = XmlUtil.getStringAttr(xml, "action", null);
+        override.component = XmlUtil.getStringAttr(xml, "component", null);
+
+        override.orients = Sets.newSetOf(int);
+        for each (var orient :int in toOrientArray(
+            XmlUtil.getStringAttr(xml, "orients", null))) {
+            override.orients.add(orient);
         }
         return override;
     }


Added Recent Modules

Added Recent Modules

--- src/LevelStates/LevelState.as
+++ src/LevelStates/LevelState.as
@@ -55,6 +55,7 @@
 		protected var preserveModule:Boolean;
 		protected var runningTest:Boolean;

+		protected var recentModules:Vector.<Class>;
 		protected var moduleCategory:String;
 		protected var moduleList:ButtonList;
 		protected var moduleSliders:Vector.<ModuleSlider>;
@@ -94,6 +95,7 @@
 			initialMemory = level.goal.genMem(0.5);

 			load();
+			recentModules = new Vector.<Class>;

 			makeUI();
 			upperLayer.add(new DGoal(level));
@@ -345,6 +347,26 @@
 				}, "Choose "+category+" modules" /*TODO: replace with category description?*/).setParam(category).setDisabled(!allowed));
 			}

+			if (recentModules.length) {
+				moduleButtons.push(new TextButton( -1, -1, "<Recent>").setDisabled(true));
+				for each (moduleType in recentModules) {
+					moduleButtons.push(new TextButton( -1, -1, Module.getArchetype(moduleType).name, function chooseModule(moduleType:Class):void {
+						archetype = Module.getArchetype(moduleType);
+						if (archetype.getConfiguration())
+							currentModule = new moduleType( -1, -1, archetype.getConfiguration().value);
+						else
+							currentModule = new moduleType( -1, -1);
+						currentModule.initialize();
+
+						modules.push(currentModule);
+						displayModules.push(midLayer.add(new DModule(currentModule)));
+						addRecentModule(moduleType);
+
+						preserveModule = true;
+					}, "").setParam(moduleType).setTooltipCallback(Module.getArchetype(moduleType).getDescription));
+				}
+			}
+
 			//put 'em in a list
 			moduleList = new ButtonList(130, 10, moduleButtons, function onListClose():void {
 				if (listOpen == LIST_CATEGORIES)
@@ -354,6 +376,14 @@
 			moduleList.setSpacing(4);
 			moduleList.justDie = true;
 			upperLayer.add(moduleList);
+
+			moduleSliders = new Vector.<ModuleSlider>;
+			for (var i:int = 0; i < recentModules.length; i++ ) {
+				moduleType = recentModules[i];
+				var archetype:Module = Module.getArchetype(moduleType);
+				if (archetype.getConfiguration())
+					moduleSliders.push(upperLayer.add(new ModuleSlider(moduleList.x + moduleList.width, moduleButtons[i+Module.ALL_CATEGORIES.length+1], archetype)));
+			}
 		}

 		protected function makeModuleList():void {
@@ -382,6 +412,7 @@

 					modules.push(currentModule);
 					displayModules.push(midLayer.add(new DModule(currentModule)));
+					addRecentModule(moduleType);

 					preserveModule = true;
 				}, "").setParam(moduleType).setTooltipCallback(Module.getArchetype(moduleType).getDescription));
@@ -405,6 +436,14 @@
 				if (archetype.getConfiguration())
 					moduleSliders.push(upperLayer.add(new ModuleSlider(moduleList.x + moduleList.width, moduleButtons[i+1], archetype)));
 			}
+		}
+
+		protected function addRecentModule(moduleType:Class):void {
+			if (recentModules.indexOf(moduleType) >= 0)
+				recentModules.splice(recentModules.indexOf(moduleType), 1);
+			else if (recentModules.length > 3)
+				recentModules.pop();
+			recentModules.unshift( moduleType);
 		}

 		override public function update():void {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5067
Author:   smgilson@adobe.com
Date:     2009-02-25T16:21:22.849704Z

Log Message:
-----------
In preparation for adding ASDoc version tags for Flex, remove old tags from AIR files

QE Notes: None
Doc Notes: None
Bugs: -

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/airframework/src/mx/events/FlexNativeMenuEvent.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/airframework/src/mx/controls/FileSystemEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.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/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemSizeDisplayMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeWindowBoundsEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/WindowExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as
@@ -117,7 +117,6 @@
  *  @see mx.controls.FileSystemList
  *  @see mx.controls.FileSystemTree
  *
- *  @playerversion AIR 1.1
  */
 public class FileSystemComboBox extends ComboBox
 {
@@ -131,7 +130,7 @@

     /**
      *  A constant that can be used as a value for the directory property,
-	 *  representing a pseudo-top level directory named "Computer". This pseudo-directory
+     *  representing a pseudo-top level directory named "Computer". This pseudo-directory
      *  contains the root directories
      *  (such as C:\ and D:\ on Windows or / on Macintosh).
      */
@@ -220,7 +219,7 @@

         invalidateProperties();

-		dispatchEvent(new Event("directoryChanged"));
+        dispatchEvent(new Event("directoryChanged"));
     }

     //----------------------------------
@@ -298,9 +297,9 @@
             dataProvider = getParentChain(_directory);
             selectedItem = _directory;

-			var event:FileEvent = new FileEvent(FileEvent.DIRECTORY_CHANGE);
-			event.file = _directory;
-			dispatchEvent(event);
+            var event:FileEvent = new FileEvent(FileEvent.DIRECTORY_CHANGE);
+            event.file = _directory;
+            dispatchEvent(event);

             directoryChanged = false;
         }
@@ -316,16 +315,16 @@
         // The name of the COMPUTER pseudo-directory is localizable.
         // It appears at the top of the dropdown,
         // and may also be displayed as the selected item.
-		invalidateSize();
+        invalidateSize();
         invalidateDisplayList();
-		selectedIndex = selectedIndex;
+        selectedIndex = selectedIndex;
     }

     /**
      *  @private
      */
     override protected function calculatePreferredSizeFromData(count:int):Object
-	{
+    {
         var maxW:Number = 0;
         var maxH:Number = 0;

@@ -349,7 +348,7 @@

             lineMetrics = measureText(txt);

-			lineMetrics.width += i * indent;
+            lineMetrics.width += i * indent;

             maxW = Math.max(maxW, lineMetrics.width);
             maxH = Math.max(maxH, lineMetrics.height);
@@ -372,7 +371,7 @@
             iterator.seek(bookmark, 0);

         return { width: maxW, height: maxH };
-	}
+    }

     //--------------------------------------------------------------------------
     //
@@ -479,11 +478,11 @@
             return;

         var iconClass:Class = comboBox.getStyle(
-        	comboBox.helper.isComputer(File(data)) ?
+            comboBox.helper.isComputer(File(data)) ?
             "computerIcon" :
             "directoryIcon");

-		if (iconClass)
+        if (iconClass)
         {
             icon = new iconClass();
             addChild(DisplayObject(icon));


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

--- frameworks/projects/framework/src/mx/core/DeferredInstanceFromClass.as
+++ frameworks/projects/framework/src/mx/core/DeferredInstanceFromClass.as
@@ -0,0 +1,88 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+
+/**
+ *  A deferred instance factory that creates and returns an instance
+ *  of a specified class.
+ *  An application can use the getInstance() method to
+ *  create an instance of the class when it is first needed and get
+ *  a reference to the instance thereafter.
+ *
+ *  @see DeferredInstanceFromFunction
+ */
+public class DeferredInstanceFromClass implements IDeferredInstance
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+	 *
+	 *  @param generator The class whose instance the getInstance()
+	 *  method creates and returns.
+     */
+    public function DeferredInstanceFromClass(generator:Class)
+    {
+		super();
+
+    	this.generator = generator;
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 * 	@private
+     *	The generator class.
+     */
+    private var generator:Class;
+
+	/**
+	 * 	@private
+	 * 	The generated value.
+	 */
+	private var instance:Object = null;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *	Creates and returns an instance of the class specified in the
+	 *  DeferredInstanceFromClass constructor, if it does not yet exist;
+	 *  otherwise, returns the already-created class instance.
+	 *
+	 *  @return An instance of the class specified in the
+	 *  DeferredInstanceFromClass constructor.
+	 */
+	public function getInstance():Object
+	{
+		if (!instance)
+			instance = new generator();
+
+		return instance;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7743
Author:   clucier@adobe.com
Date:     2009-06-11T13:53:10.203664Z

Log Message:
-----------
Moving away from using namespace qualifiers in most cases in the SDK.  We've run into a few cases now where the use of qualifiers in code that is called excessively can slow things down.
Bugs: SDK-21337
Reviewer: Ryan, Paul
QE Notes: None
Tests: Ran several random Mustella test groups, checkintests.

Modified Paths:
--------------
106 paths were modified

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

--- frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as
+++ frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as
@@ -40,6 +40,8 @@
 import mx.managers.SystemManager;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.StyleManager;
+
+use namespace mx_internal;

 [ExcludeClass]

@@ -664,7 +666,7 @@
      */
     private function effectEndHandler(event:EffectEvent):void
     {
-        DragManager.mx_internal::endDrag();
+        DragManager.endDrag();
     }

 	/**


Added Entity.world property to get the World an Entity has been added to.

--- net/flashpunk/Entity.as
+++ net/flashpunk/Entity.as
@@ -363,6 +363,14 @@
 		}

 		/**
+		 * The World object this Entity has been added to.
+		 */
+		public function get world():World
+		{
+			return _world;
+		}
+
+		/**
 		 * The rendering layer of this Entity. Higher layers are rendered first.
 		 */
 		public function get layer():int { return _layer; }


factorize + add debug logs for fragment/key loading

--- src/org/mangui/HLS/streaming/FragmentLoader.as
+++ src/org/mangui/HLS/streaming/FragmentLoader.as
@@ -113,6 +113,7 @@
               _keymap[frag.decrypt_url] = keyData;
               // now load fragment
               try {
+                 Log.debug("loading fragment:" + frag.url);
                  _fragstreamloader.load(new URLRequest(frag.url));
               } catch (error:Error) {
                   _hls.dispatchEvent(new HLSEvent(HLSEvent.ERROR, error.message));
@@ -328,21 +329,7 @@
             _last_segment_continuity_counter = frag.continuity;
             _last_segment_program_date = frag.program_date;
             Log.debug("Loading       "+ _seqnum +  " of [" + (_levels[_level].start_seqnum) + "," + (_levels[_level].end_seqnum) + "],level "+ _level);
-
-
-            _last_segment_decrypt_key_url = frag.decrypt_url;
-            if(_last_segment_decrypt_key_url != null && (_keymap[_last_segment_decrypt_key_url] == undefined)) {
-              _last_segment_decrypt_iv = frag.decrypt_iv;
-              // load key
-              _keystreamloader.load(new URLRequest(_last_segment_decrypt_key_url));
-            } else {
-              try {
-                 _fragByteArray = null;
-                 _fragstreamloader.load(new URLRequest(frag.url));
-              } catch (error:Error) {
-                  _hls.dispatchEvent(new HLSEvent(HLSEvent.ERROR, error.message));
-              }
-            }
+            _loadfragment(frag);
             return 0;
         }

@@ -425,7 +412,7 @@
                 _last_segment_program_date = frag.program_date;
                 // check whether there is a discontinuity between last segment and new segment
                 _hasDiscontinuity = (frag.continuity != _last_segment_continuity_counter);
-					 // update discontinuity counter
+                // update discontinuity counter
                 _last_segment_continuity_counter = frag.continuity;
                 log_prefix = "Loading       ";
               }
@@ -435,22 +422,27 @@
             _frag_loading_start_time = new Date().valueOf();
             frag = _levels[_level].getFragmentfromSeqNum(_seqnum);
             Log.debug(log_prefix + _seqnum +  " of [" + (_levels[_level].start_seqnum) + "," + (_levels[_level].end_seqnum) + "],level "+ _level);
-
+            _loadfragment(frag);
+            return 0;
+        };
+
+        private function _loadfragment(frag:Fragment):void {
             _last_segment_decrypt_key_url = frag.decrypt_url;
             if(_last_segment_decrypt_key_url != null && (_keymap[_last_segment_decrypt_key_url] == undefined)) {
               _last_segment_decrypt_iv = frag.decrypt_iv;
               // load key
-              _keystreamloader.load(new URLRequest(frag.decrypt_url));
+              Log.debug("loading key:" + _last_segment_decrypt_key_url);
+              _keystreamloader.load(new URLRequest(_last_segment_decrypt_key_url));
             } else {
               try {
                  _fragByteArray = null;
+		 Log.debug("loading fragment:" + frag.url);
                  _fragstreamloader.load(new URLRequest(frag.url));
               } catch (error:Error) {
                   _hls.dispatchEvent(new HLSEvent(HLSEvent.ERROR, error.message));
               }
             }
-            return 0;
-        };
+        }

         /** Store the manifest data. **/
         private function _manifestLoadedHandler(event:HLSEvent):void {


Transferred from the Adobe Open Source Subversion Repository

Revision: 134
Author:   proberts@adobe.com
Date:     2008-01-09T17:46:02.145068Z

Log Message:
-----------
Severity: ignore
Description: Added docs for IWindow and updated its implementors. This is a partial fix for FLEXDOCS-262: Several classes missing class descriptions.

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/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>

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

--- frameworks/projects/airframework/src/mx/core/Window.as
+++ frameworks/projects/airframework/src/mx/core/Window.as
@@ -1468,7 +1468,7 @@
 	private var _systemChrome:String = "standard";

 	/**
-	 *  Specifies the type of system chrome the window has.
+	 *  Specifies the type of system chrome (if any) the window has.
 	 *  The set of possible values is defined by the constants
 	 *  in the NativeWindowSystemChrome class.
 	 *
@@ -1652,7 +1652,7 @@
     [Bindable("titleIconChanged")]

     /**
-     *  The Class (usually for an image) used to draw the title bar icon.
+     *  The Class (usually an image) used to draw the title bar icon.
      *
      *  @default null
      */
@@ -2261,7 +2261,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  Closes the Window. This action is cancelable.
+     *  Closes the window. This action is cancelable.
      */
     public function close():void
     {
@@ -2324,7 +2324,7 @@
     }

  	/**
-     *  Maximizes the underlying NativeWindow, or does nothing it if it's already maximized.
+     *  Maximizes the window, or does nothing if it's already maximized.
      */
     public function maximize():void
     {
@@ -2347,7 +2347,7 @@
     }

     /**
-     *  Minimizes the underlying NativeWindow.
+     *  Minimizes the window.
      */
     public function minimize():void
     {
@@ -2364,7 +2364,7 @@
     }

     /**
-     *  Restores the underlying NativeWindow (unmaximizes it if it's maximized, or
+     *  Restores the window (unmaximizes it if it's maximized, or
      *  unminimizes it if it's minimized).
      */
 	public function restore():void


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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