New statistics

New statistics

--- src/com/axis/mjpgplayer/MJPG.as
+++ src/com/axis/mjpgplayer/MJPG.as
@@ -11,12 +11,19 @@

   public class MJPG extends Sprite {

+    private const FLOATING_AVG_LENGTH:Number = 10;
+    private const MAX_IMAGES:uint = 2;
+
     private var ipCam:IPCam;
-    private var maxImages:uint = 2;
+    // All incoming raw image data chunks
+    private var imgBuf:Vector.<Object> = new Vector.<Object>();
+    // Children loaders which are available for use
+    private var idleQueue:Vector.<MJPGImage> = new Vector.<MJPGImage>();
+    // States
     private var firstImage:Boolean = true;
-    private var imgBuf:Vector.<Object> = new Vector.<Object>();
-    private var idleQue:Vector.<MJPGImage> = new Vector.<MJPGImage>();
     private var playing:Boolean = false;
+    // Statistics
+    private var timestamps:Vector.<Number> = new Vector.<Number>();

     public function MJPG(ipCam:IPCam) {
       this.ipCam = ipCam;
@@ -30,7 +37,7 @@
     }

     private function createLoaders():void {
-      for (var i:uint = 0; i < maxImages; i++) {
+      for (var i:uint = 0; i < MAX_IMAGES; i++) {
         var loader:MJPGImage = new MJPGImage();
         loader.cacheAsBitmap = false;
         loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
@@ -54,29 +61,27 @@
     }

     public function getChildren():Array {
-       var children:Array = [];
-       for (var i:uint = 0; i < this.numChildren; i++) {
-        children.push(this.getChildAt(i));
-       }
-       return children;
+      var children:Array = [];
+      for (var i:uint = 0; i < this.numChildren; i++) {
+       children.push(this.getChildAt(i));
+      }
+      return children;
     }

     public function load(image:ByteArray):void {
-      if (imgBuf.length >= maxImages + 3) {
-        imgBuf.shift();
-      }
+      if (imgBuf.length >= MAX_IMAGES + 3) { imgBuf.shift(); }
       imgBuf.push({ data: image });

       if (!playing) {
         playing = true;
         for each (var loader:MJPGImage in getChildren()) {
           loader.data.inQue = true;
-          idleQue.push(loader);
+          idleQueue.push(loader);
         }
       }

-      if (idleQue.length > 0) {
-        loadImage(idleQue.shift(), imgBuf.shift());
+      if (idleQueue.length > 0) {
+        loadImage(idleQueue.shift(), imgBuf.shift());
       }
     }

@@ -86,6 +91,62 @@
       loader.data.loadTime = new Date().getTime();
       loader.loadBytes(obj.data as ByteArray);
       obj = null;
+    }
+
+    private function onLoadComplete(event:Event):void {
+      if (!playing) { return; }
+
+      var arr:Array = getChildren();
+      var loader:MJPGImage = event.currentTarget.loader as MJPGImage;
+      var bitmap:Bitmap = event.currentTarget.content;
+      if (bitmap != null) {
+        bitmap.smoothing = true;
+      }
+      loader.data.loading = false;
+
+      scaleAndPosition(loader);
+
+      timestamps.push(new Date().getTime());
+      if (timestamps.length > FLOATING_AVG_LENGTH) { timestamps.shift(); }
+
+      if (arr[arr.length - 1].data.loadTime <= loader.data.loadTime) {
+        if (MAX_IMAGES > 2) {
+          removeChild(loader);
+          addChild(loader);
+        } else if (MAX_IMAGES == 2) {
+          this.swapChildren(arr[0], arr[1]);
+        }
+      }
+
+      arr = getChildren();
+      for (var i:uint = 0; i < arr.length - 1; i++) {
+        loader = arr[i] as MJPGImage;
+
+        if (loader.data.inQue == true || loader.data.loading) { continue; }
+
+        if (imgBuf.length == 0) {
+          loader.data.inQue = true;
+          idleQueue.push(loader);
+        } else {
+          loadImage(loader, imgBuf.shift());
+        }
+      }
+
+      if (firstImage) {
+        ExternalInterface.call(ipCam.getJsEventCallbackName(), "started");
+        firstImage = false;
+      }
+    }
+
+    private function onImageError(event:IOErrorEvent):void {
+      var loader:MJPGImage = event.currentTarget.loader as MJPGImage;
+      loader.data.loading = false;
+      if (imgBuf.length == 0) {
+        loader.data.inQue = true;
+        idleQueue.push(loader);
+      } else {
+        loadImage(loader, imgBuf.shift());
+      }
     }

     private function scaleAndPosition(loader:MJPGImage):void {
@@ -106,64 +167,10 @@
       loader.y = (stage.stageHeight - loader.height) / 2;
     }

-    private function onLoadComplete(event:Event):void {
-      if (!playing) { return; }
-
-      var arr:Array = getChildren();
-      var loader:MJPGImage = event.currentTarget.loader as MJPGImage;
-      var bitmap:Bitmap = event.currentTarget.content;
-      if (bitmap != null) {
-        bitmap.smoothing = true;
-      }
-      loader.data.loading = false;
-
-      scaleAndPosition(loader);
-
-      var curTime:Number = new Date().getTime();
-      if (arr[arr.length - 1].data.loadTime <= loader.data.loadTime) {
-        if (maxImages > 2) {
-          removeChild(loader);
-          addChild(loader);
-        } else if (maxImages == 2) {
-          this.swapChildren(arr[0], arr[1]);
-        }
-      }
-
-      arr = getChildren();
-      for (var i:uint = 0; i < arr.length - 1; i++) {
-        loader = arr[i] as MJPGImage;
-
-        if (loader.data.inQue == true || loader.data.loading) { continue; }
-
-        if (imgBuf.length == 0) {
-          loader.data.inQue = true;
-          idleQue.push(loader);
-        } else {
-          loadImage(loader, imgBuf.shift());
-        }
-      }
-
-      if (firstImage) {
-        ExternalInterface.call(ipCam.getJsEventCallbackName(), "started");
-        firstImage = false;
-      }
-    }
-
-    private function onImageError(event:IOErrorEvent):void {
-      var loader:MJPGImage = event.currentTarget.loader as MJPGImage;
-      loader.data.loading = false;
-      if (imgBuf.length == 0) {
-        loader.data.inQue = true;
-        idleQue.push(loader);
-      } else {
-        loadImage(loader, imgBuf.shift());
-      }
-    }
-
     public function reset(clear:Boolean = false):void {
       playing = false;
       firstImage = true;
-      idleQue.length = 0;
+      idleQueue.length = 0;

       while (imgBuf.length != 0) {
         imgBuf.shift();
@@ -182,7 +189,12 @@
     }

     public function getFps():Number {
-      return 1337;
+      if (timestamps.length < 2) { return 0; }
+      var loadTimesSum:Number = 0;
+      for (var i:uint = 1; i < timestamps.length; i++) {
+        loadTimesSum += timestamps[i] - timestamps[i - 1];
+      }
+      return 1000 * (timestamps.length - 1) / loadTimesSum;
     }

   }


Transferred from the Adobe Open Source Subversion Repository

Revision: 13756
Author:   hmuller@adobe.com
Date:     2010-01-25T19:42:14.082913Z

Log Message:
-----------
Mirroring changes, fixes.

- Removed ILayout interface, added mirroring API to IVisualElement.
- Moved layoutDirection="ltr" initialization from TextBase to defaults.css.   Removed similar initialization from DefaultItemRenderer (it wasn't needed).
- The 'get layoutDirection()' method for UIMovieClip, GraphicElement, and SpriteVisualElement now queries the parent if the local value is "inherit".
- Use @inheritDoc instead of explicitly @copying interface methods' ASDoc.   Don't call invalidateLayoutDirection() if FlexVersion.compatibilityVersion is < 4.0.
- Don't call invalidateLayout() for a child unless either its layoutDirection has changed, or its parent's layoutDirection has changed.

QE notes: These changes were cycloned.
Doc notes:
Bugs: sdk-25204, sdk-25209
Reviewer: Evtim
Tests run:
Is noteworthy for integration: no

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/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutDirection.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.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/spark/defaults.css</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/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
+++ frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as
@@ -39,7 +39,6 @@
 import mx.core.IFlexModule;
 import mx.core.IFlexModuleFactory;
 import mx.core.IInvalidating;
-import mx.core.ILayoutDirection;
 import mx.core.ILayoutElement;
 import mx.core.IStateClient;
 import mx.core.IUIComponent;
@@ -3092,19 +3091,22 @@
 	//----------------------------------

 	private var _layoutDirection:String = "inherit";
-
+
+    /**
+     *  @inheritDoc
+     */
 	public function get layoutDirection():String
 	{
         if (_layoutDirection != "inherit")
             return _layoutDirection;

-        const parentElt:ILayoutDirection = parent as ILayoutDirection;
+        const parentElt:IVisualElement = parent as IVisualElement;
         return (parentElt) ? parentElt.layoutDirection : "ltr";
 	}

-	/**
-	 *  @copy mx.core.IVisualElement#layoutDirection
-	 */
+    /**
+     *  @private
+     */
 	public function set layoutDirection(value:String):void
 	{
 		if (_layoutDirection == value)
@@ -3115,11 +3117,11 @@
     }

     /**
-     * @copy mx.core.ILayoutDirection#invalidateLayoutDirection()
+     * @inheritDoc
      */
     public function invalidateLayoutDirection():void
     {
-        const parentElt:ILayoutDirection = parent as ILayoutDirection;
+        const parentElt:IVisualElement = parent as IVisualElement;
         if (!parentElt)
             return;


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 7088
Author:   smgilson@adobe.com
Date:     2009-05-19T20:49:49.563900Z

Log Message:
-----------
ASDoc updates

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ListSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/ButtonBarButton.as
+++ frameworks/projects/spark/src/spark/components/ButtonBarButton.as
@@ -17,9 +17,19 @@
 import mx.core.mx_internal;

 /**
- *  The ButtonBarButton implements IDataRenderer
- *  and proxies the label property with the data
- *  property. Used in the default skin for the ButtonBar.
+ *  The ButtonBarButton class defines the custom item renderer
+ *  used by the ButtobBar control.
+ *  This item renderer is used in the ButtonBarSkin class,
+ *  the default skin for the ButtonBar.
+ *
+ *  @see spark.components.ButtonBar
+ *  @see spark.skins.default.ButtonBarSkin
+ *
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class ButtonBarButton extends ToggleButton implements IItemRenderer
 {
@@ -49,6 +59,13 @@

     /**
      *  @inheritDoc
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get allowDeselection():Boolean
     {
@@ -75,6 +92,13 @@

     /**
      *  @inheritDoc
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get caret():Boolean
     {
@@ -100,6 +124,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get data():Object
     {
@@ -126,6 +155,10 @@
     /**
      *  @inheritDoc
      *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get labelText():String
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 15982
Author:   matamel@adobe.com
Date:     2010-05-10T11:17:02.550420Z

Log Message:
-----------
Bug: BLZ-522 - Enhancement request to run BlazeDS messaging code in ActionScript outside of a Flex Application.
QA: Yes
Doc: Maybe - it'd be good to mention what people need to do if they want to use rpc.swc without a Flex UI component. See the bug for details.
Checkintests: Pass

Details: rpc.swc couldn't be used without a Flex UI component before, this was due to:

1- Some client-side classes need to be registered with Flash player; this normally is handled by generated AS code when an MXML is compiled to SWF, but when MXML is not involved, one needs to register these classes manually.
2- LoaderConfig.url is not available outside Flex and this was causing "url is null" error in Channel url token replacement code.

There isn't much we can do for #1, classes still need to be registered with Flash player so strong types are used instead of generic Objects on the client/server. For #2, I added a URLUtil.hasTokens(url:String) method that takes in a url and returns true if the url contains server.name/server.port tokens. Then, I changed Channel url token replacement code to use this new method. This resolves the "url is null" error.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/URLUtil.as</path>

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

--- frameworks/projects/rpc/src/mx/utils/URLUtil.as
+++ frameworks/projects/rpc/src/mx/utils/URLUtil.as
@@ -435,6 +435,28 @@
     }

     /**
+     * Given a url, determines whether the url contains the server.name and
+     * server.port tokens.
+     *
+     * @return true if the url contains server.name and server.port tokens.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static function hasTokens(url:String):Boolean
+    {
+        if (url == null || url == "")
+            return false;
+        if (url.indexOf(SERVER_NAME_TOKEN) > 0)
+            return true;
+        if (url.indexOf(SERVER_PORT_TOKEN) > 0)
+            return true;
+        return false;
+    }
+
+    /**
      * If the LoaderConfig.url property is not available, the replaceTokens() method will not
      * replace the server name and port properties properly.
      *


Transferred from the Adobe Open Source Subversion Repository

Revision: 22608
Author:   smgilson@adobe.com
Date:     2011-09-16T17:19:03.985309Z

Log Message:
-----------
- Add ViewMenu example, add image to ViewMenu.as

- fix typos in ASDoc comments

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

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/ViewMenuExampleHome.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/View.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/asdoc/en_US/spark/components/examples/ViewMenuExample.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewMenuItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ActionBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -113,7 +113,7 @@
  *  This class includes a TabBar control that provides the ability to toggle between
  *  the collection of view navigators.
  *
- *
The following images shows a TabbedViewNavigator with three sections:
+ *
The following image shows a TabbedViewNavigator with three sections:
  *  Employees, Contacts, and Search:

  *
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 20153
Author:   chiedozi@adobe.com
Date:     2011-02-04T23:48:40.235592Z

Log Message:
-----------
TabbedViewNavigator now forces a validation when switching tabs to remove a flicker issue when showing a View with a Scroller

QE notes:
Doc notes:
Bugs:SDK-29307
Reviewer: Ryan
Tests run:
Is noteworthy for integration: No

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -685,6 +685,11 @@
                 navigator.visible = true;
                 navigator.includeInLayout = true;

+                // Force a validation of the new navigator to prevent a flicker from
+                // occurring in cases where multiple validation passes are required
+                // to completely validate a view
+                navigator.validateNow();
+
                 if (navigator.activeView)
                 {
                     updateControlsForView(navigator.activeView);


Transferred from the Adobe Open Source Subversion Repository

Revision: 19167
Author:   smgilson@adobe.com
Date:     2010-12-08T21:07:50.821383Z

Log Message:
-----------
first ASDoc pass on view transitions

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransitionMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransitionMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionDirection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransitionMode.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as
@@ -51,49 +51,63 @@

 /**
  *  Dispatched when the transition starts.
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
  */
 [Event(name="transitionStart", type="flash.events.Event")]

 /**
  *  Dispatched when the transition is complete.
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
  */
 [Event(name="transitionEnd", type="flash.events.Event")]

 /**
- *  The ViewTransitionBase class serves as the base class for all stock view
- *  transitions.  It is not intended to be used as a transition on its own.
- *
+ *  The ViewTransitionBase class is the base class for all view transitions.
+ *  It is not intended to be used as a transition on its own.
  *  In addition to providing common convenience and helper methods used by
  *  view transitions this class also provides a default action bar transition
  *  sequence.
  *
- *
When a view transition is initialized, the owning view navigator will
- *  assign the startView and endView references to the views the transition
- *  will be animating from and to. In addition, the navigator property will
- *  be set to reflect the view navigator.

+ *
When a view transition is initialized, the owning view navigator
+ *  sets the startView and endView properties
+ *  to the views the transition animates.
+ *  The navigator property is
+ *  set to the view navigator.

  *
- *
The lifecycle of a transition starts with the captureStartValues()
- *  method.  When this method is called, the navigator is currently in the
- *  start state.  At this point the transition should capture any start values
- *  or bitmaps that it requires.  Afterwards, a validation pass on the pending
- *  view and captureEndValues() will be called. At this point the
- *  transition is to capture any properties or bitmaps representations from the
- *  pending view.

+ *
The lifecycle of a transition starts with
+ *  the captureStartValues() method.
+ *  When this method is called, the navigator is currently in the
+ *  start state.
+ *  At this time, the transition should capture any start values
+ *  or bitmaps that it requires.
+ *  Afterwards, a validation pass on the pending
+ *  view and captureEndValues() is called.
+ *  At this time, the transition captures any properties or
+ 8  bitmaps representations from the pending view.

  *
- *
At this point prepareForPlay() is called, which allows the transition
- *  to perform any further preparation (such as preparing a spark effects sequence,
- *  or positioning transient elements on the display list).

+ *
The prepareForPlay() method is then called,
+ *  which allows the transition  to perform any further preparation,
+ *  such as preparing a Spark effects sequence,
+ *  or positioning transient elements on the display list.

  *
- *
After one final validation pass (if necessary), play() is invoked
- *  by the navigator to perform the actual transition. Prior to any animation
- *  starting the FlexEvent.TRANSITION_START event will be dispatched.

+ *
After a final validation pass, if necessary, the play() method
+ *  is called by the navigator to perform the actual transition.
+ *  Prior to any animation starting, the start event is dispatched.

  *
- *
When a transition completes, it is required to dispatch a
- *  FlexEvent.TRANSITION_END event.

+ *
When a transition completes, it is required to dispatch an
+ *  end event.

+ *
+ *
Note:Create and configure view transitions in ActionScript;
+ *  you cannot create them in MXML.

  *
  *  @langversion 3.0
- *  @playerversion Flash 10
  *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
@@ -134,7 +148,6 @@
      *  Constructor.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -200,11 +213,11 @@
     private var _duration:Number = 250;

     /**
-     *  Duration of the transition in milliseconds. The default may vary
-     *  depending on the transition.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Duration of the transition, in milliseconds.
+     *  The default may vary depending on the transition
+     *  but is defined in ViewTransitionBase as 250 ms.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -232,10 +245,9 @@
      *  generally propagated to the IEffect instance managing the actual
      *  transition animation.
      *
-     *  @default new Sine(.5);
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  @default Sine(.5);
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -270,7 +282,6 @@
      *  @default null
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -291,13 +302,13 @@
     private var _endView:View;

     /**
-     *  The reference to the view that the navigator is transitioning
-     *  to, set by the owning ViewNavigator itself.  This can be null.
+     *  Reference to the view that the navigator is transitioning
+     *  to, set by the owning ViewNavigator itself.
+     *  This property can be null.
      *
      *  @default null
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -327,7 +338,6 @@
      *  @default null
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -351,11 +361,11 @@
     private var _startView:View;

     /**
-     *  The currently active view of the view navigator, set by the owning
-     *  view navigator itself. This can be null.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Reference to the currently active view of the view navigator,
+     *  set by the owning view navigator.
+     *  This property can be null.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -379,21 +389,22 @@
     private var _transitionControlsWithContent:Boolean;

     /**
-     *  When set to true, the primary view transition
-     *  is used to transition the navigator in its entirety,
-     *  and sub-transitions such as the action bar or
-     *  tab bar transitions are not performed.
+     *  When set to true, the primary view transition
+     *  is used to transition the view navigator in its entirety,
+     *  including the action bar.
+     *  Specific transitions for the action bar are not performed.
+     *  Because the tab bar is associated with the entire application,
+     *  and not a view, view transitions do not affect it.
      *
-     *
Note that even when set to false, there are cases
-     *  where its not feasible to transition the action bar
-     *  or tab bar, such as when the action bar or
-     *  tab bar does not exist in one of the two views or
-     *  if the tab bar or action bar changes size.

+     *
Note that even when set to false, there are cases
+     *  where its not feasible to transition the action bar.
+     *  For example, when the action bar
+     *  does not exist in one of the two views, or
+     *  if the action bar changes size.

      *
      *  @default false
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -537,15 +548,15 @@
     //--------------------------------------------------------------------------

     /**
-     *  This method is called by the ViewNavigator during the preparation phase of a transition.
+     *  Called by the ViewNavigator during the preparation phase of a transition.
      *  It is invoked when the new view has been fully realized and validated and the
-     *  action bar and tab bar content reflect the state of the new view. It is at
-     *  this point that the transition is to capture any values it requires from the
-     *  pending view. In addition any bitmaps reflecting the state of the new view, tab bar,
+     *  action bar and tab bar content reflect the state of the new view.
+     *  The transition can use this method capture any values it requires from the
+     *  pending view.
+     *  Any bitmaps reflecting the state of the new view, tab bar,
      *  or action bar should be captured if required for animation.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -593,15 +604,15 @@
     }

     /**
-     *  This method is called by the ViewNavigator during the preparation phase of a transition.
+     *  Called by the ViewNavigator during the preparation phase of a transition.
      *  It is invoked when the new view has been fully realized and validated and the
-     *  action bar and tab bar content reflect the state of the new view. It is at
-     *  this point that the transition is to capture any values it requires from the
-     *  pending view. In addition any bitmaps reflecting the state of the new view, tab bar,
-     *  or action bar should be captured if required for animation.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  action bar and tab bar content reflect the state of the new view.
+     *  It is at this point that the transition can capture any values it requires from the
+     *  pending view.
+     *  In addition any bitmaps reflecting the state of the new view, tab bar,
+     *  or action bar should be captured, if required for animation.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -618,12 +629,12 @@
     }

     /**
-     *  This method is called by the ViewNavigator when the transition
-     *  should begin animating.  At this time the transition should dispatch a
-     *  FlexEvent.TRANSITION_START event.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Called by the ViewNavigator when the transition
+     *  should begin animating.
+     *  At this time, the transition should dispatch a
+     *  start event.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -644,28 +655,30 @@
     }

     /**
-     *  This method is called by the ViewNavigator during the preparation phase
-     *  of a transition.  It gives the transition the chance to create and
+     *  Called by the ViewNavigator during the preparation phase
+     *  of a transition.
+     *  This method gives the transition the chance to create and
      *  configure the underlying IEffect instance, or to add any transient
-     *  elements to the display list (e.g. bitmap placeholders, temporary
-     *  containers required during the transition, etc.). One final validation
-     *  pass will occur prior to invocation of play() (if required).
-     *
-     *  If it is determined that a standard transition can be initiated (e.g one
-     *  that transitions the control bars separately from the views), the default
-     *  implementation of prepareForPlay() will construct a single Parallel effect
-     *  which wraps the individual effect sequences for the view transition, the
-     *  action bar transition, and the tab bar transition.  prepareForPlay() makes
-     *  use of the helper methods, createActionBarEffect(), createTabBarEffect(),
-     *  and createViewEffect() to do so.
-     *
-     *  If transitionControlsWithContent is set to true, or if it is determined that
-     *  the control bars cannot be transitioned independently, a single effect is
-     *  created to transition the navigator in its entirety from its before and
-     *  after states. In this case, only createConsolidatedEffect() is invoked.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  elements to the display list.
+     *  Example transient elements include  bitmap placeholders, temporary
+     *  containers required during the transition,  and other elements.
+     *  If required, a final validation pass occurs prior to  the invocation
+     *  of the play() method.
+     *
+     *
If it is determined that a standard transition can be initiated,
+     *  meaning one that transitions the control bars separately from the views,
+     *  the default implementation of this method constructs
+     *  a single Parallel effect which wraps the individual effect sequences
+     *  for the view transition, the action bar transition, and the tab bar transition.
+     *  This method uses the  methods, createActionBarEffect(),
+     *  createTabBarEffect(), and createViewEffect().

+     *
+     *
If transitionControlsWithContent is set to true,
+     *  or if it is determined that the control bars cannot be transitioned independently,
+     *  a single effect is created to transition the navigator in its entirety.
+     *  In this case, only createConsolidatedEffect() is invoked.

+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -707,17 +720,17 @@
     }

     /**
-     *  Called by the default prepareForPlay() implementation, this method
-     *  is responsible for creating the spark effect that should be played on the
-     *  action bar when the transition starts.  This method should be
-     *  overridden by sub classes if a custom action bar effect is
-     *  required.  By default, this returns a basic action bar effect.
-     *
-     *  @return An IEffect instance serving as the action bar effect. Will be
-     *  played by the default play() method implementation.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Called by the default prepareForPlay() implementation,
+     *  this method is responsible for creating the Spark effect
+     *  played on the action bar when the transition starts.
+     *  This method should be overridden by sub classes if a custom action bar
+     *  effect is required.
+     *  By default, this method returns a basic action bar effect.
+     *
+     *  @return An IEffect instance serving as the action bar effect.
+     *  This effect is played by the default play() method implementation.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -900,16 +913,16 @@
     }

     /**
-     *  Called by the default prepareForPlay() implementation, this method
-     *  is responsible for creating the spark effect that should be played
-     *  on the tab bar when the transition starts.  This method should be
-     *  overridden by sub classes.  By default, this returns null.
-     *
-     *  @return An IEffect instance serving as the tab bar transition. Will be played
-     *  by the default play() method implementation.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Called by the default prepareForPlay() implementation,
+     *  this method is responsible for creating the Spark effect played
+     *  on the tab bar when the transition starts.
+     *  This method should be overridden by subclasses.
+     *  By default, this returns null.
+     *
+     *  @return An IEffect instance serving as the tab bar transition.
+     *  This effect is played by the default play() method implementation.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -919,16 +932,16 @@
     }

     /**
-     *  Called by the default prepareForPlay() implementation, this method
-     *  is responsible for creating the spark effect that should be played
-     *  on the current and next view when the transition starts.  This method
-     *  should be overridden by sub classes.  By default, this returns null.
-     *
-     *  @return An IEffect instance serving as the view transition. Will be played
-     *  by the default play() method implementation.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Called by the default prepareForPlay() implementation,
+     *  this method is responsible for creating the Spark effect played
+     *  on the current and next view when the transition starts.
+     *  This method should be overridden by subclasses.
+     *  By default, this method returns null.
+     *
+     *  @return An IEffect instance serving as the view transition.
+     *  This effect is played by the default play() method implementation.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -938,17 +951,17 @@
     }

     /**
-     *  Called by the default prepareForPlay() implementation, this method
-     *  is responsible for creating the spark effect that will be played to
-     *  transition the entire navigator (inclusive of the control bar content)
-     *  when necessary.  This method should be overridden by sub classes.
-     *  By default, this returns null.
-     *
-     *  @return An IEffect instance serving as the view transition. Will be played
-     *  by the default play() method implementation.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Called by the default prepareForPlay() implementation,
+     *  this method is responsible for creating the Spark effect played to
+     *  transition the entire navigator, inclusive of the control bar content,
+     *  when necessary.
+     *  This method should be overridden by subclasses.
+     *  By default, this method returns null.
+     *
+     *  @return An IEffect instance serving as the view transition.
+     *  This effect is played by the default play() method implementation.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -958,11 +971,11 @@
     }

     /**
-     *  Called by the transition to denote that the effect object
-     *  has finished executing, dispatches a FlexEvent.TRANSITION_END event.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Called by the transition to indicate that the transition
+     *  has completed.
+     *  This method dispatches the end event.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -975,12 +988,11 @@
     }

     /**
-     *  Called after the transition is complete, responsible for
-     *  releasing any references and temporary constructs used by the
-     *  transition.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *  Called after the transition completes.
+     *  This method is responsible for  releasing any references
+     *  and temporary constructs used by the transition.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -1089,7 +1101,6 @@
      *  incompatible in some way.
      *
      *  @langversion 3.0
-     *  @playerversion Flash 10
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
@@ -1124,18 +1135,20 @@
     }

     /**
-     *  Helper method used to render snap shots of on screen elements in
-     *  preparation for transitioning.  The bitmap is returned in the form
-     *  of a BitmapImage.  The BitmapImage's transform is adjusted so that
+     *  Used to render snap shots of screen elements in
+     *  preparation for transitioning.
+     *  The bitmap is returned in the form of a BitmapImage object.
+     *  The BitmapImage object's transform is adjusted so that
      *  the bitmap matches the target.
      *
      *  @param target Display object to capture.
-     *  @param padding Paddig around the object to be included in the BitmapImage.
-     *
-     *  @return BitmapImage representation of the target.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
+     *
+     *  @param padding Padding around the object to be included in
+     *  the BitmapImage object.
+     *
+     *  @return BitmapImage object representing the target.
+     *
+     *  @langversion 3.0
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */


If no windows are open on reactivate, create a new project window

--- exporter/src/main/as/flump/export/FlumpApp.as
+++ exporter/src/main/as/flump/export/FlumpApp.as
@@ -57,10 +57,12 @@
                         project.win.nativeWindow.x = pws.windowX;
                         project.win.nativeWindow.y = pws.windowY;
                     }
-                } else {
-                    // If we have no previous projects to open, create a new project
-                    newProject();
                 }
+            }
+
+            // If no projects are open, create a new one.
+            if (_projects.length == 0) {
+                newProject();
             }
         });


Transferred from the Adobe Open Source Subversion Repository

Revision: 21667
Author:   cframpto@adobe.com
Date:     2011-07-21T16:40:10.900681Z

Log Message:
-----------
Fix Alert layoutDirection=rtl issue and change Collator.equals() and Collator.compare() to handle null strings rather than RTE.

QE notes: 4 collator tests were excluded and need to be updated
Doc notes:
Bugs: SDK-30634, SDK-30755
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>

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

--- frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
+++ frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
@@ -11,720 +11,743 @@

 package spark.globalization.supportClasses
 {
-
-import flash.globalization.Collator;
-import flash.globalization.CollatorMode;
-
-import mx.core.mx_internal;
-import mx.utils.ObjectUtil;
-
-import spark.globalization.LastOperationStatus;
-import spark.globalization.supportClasses.GlobalizationBase;
-
-use namespace mx_internal;
-
-/**
- * CollatorBase is a base class for the
- * SortingCollator and MatchingCollator classes.
- *
- *
This class is a wrapper class around the
- * flash.globalization.Collator class.
- * Therefore the locale-specific string comparison is provided by the
- * flash.globalization.Collator class.
- * However by using this class as a base class, the SortingCollator
- * and MatchingCollator classes can be used in MXML declartions.
- * In these classes, the locale style is used for the
- * requested Locale ID name and has methods and properties that are bindable.
- *

- *
- *
The flash.globalization.Collator class uses the underlying operating
- * system for the formatting functionality and to supply locale
- * specific data.
- * On some operating systems, the flash.globalization classes are
- * unsupported. On these systems the wrapper class provides fallback
- * functionality for string comparison.

- *
- * @see flash.globalization.Collator
- *
- *  @langversion 3.0
- *  @playerversion Flash 10.1
- *  @playerversion AIR 2.5
- *  @productversion Flex 4.5
- */
-public class CollatorBase extends GlobalizationBase
-{
-    include "../../core/Version.as";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class Constants
-    //
-    //--------------------------------------------------------------------------
-
-    // Names of common basic properties of
-    // spark.utils.CollatorBase and flash.globalization.Collator
-    private static const IGNORE_CASE:String = "ignoreCase";
-    private static const IGNORE_CHARACTER_WIDTH:String = "ignoreCharacterWidth";
-    private static const IGNORE_DIACRITICS:String = "ignoreDiacritics";
-    private static const IGNORE_KANA_TYPE:String = "ignoreKanaType";
-    private static const IGNORE_SYMBOLS:String = "ignoreSymbols";
-    private static const NUMERIC_COMPARISON:String = "numericComparison";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
+
+    import flash.globalization.Collator;
+    import flash.globalization.CollatorMode;
+
+    import mx.core.mx_internal;
+    import mx.utils.ObjectUtil;
+
+    import spark.globalization.LastOperationStatus;
+    import spark.globalization.supportClasses.GlobalizationBase;
+
+    use namespace mx_internal;
+
     /**
-     *  Constructs a new CollatorBase object to provide string comparisons
-     *  according to the conventions of a specified locale.
+     * CollatorBase is a base class for the
+     * SortingCollator and MatchingCollator classes.
      *
-     *
The initialMode parameter sets the initial collation
-     *  options for two use cases: sorting and matching.
-     *  It can be set to one of the two following values:

+     *
This class is a wrapper class around the
+     * flash.globalization.Collator class.
+     * Therefore the locale-specific string comparison is provided by the
+     * flash.globalization.Collator class.
+     * However by using this class as a base class, the SortingCollator
+     * and MatchingCollator classes can be used in MXML declartions.
+     * In these classes, the locale style is used for the
+     * requested Locale ID name and has methods and properties that are bindable.
+     *

      *
-     *

-     *
CollatorMode.SORTING: sets the collation options for
-     *       general linguistic sorting uses such as sorting a list of
-     *       text strings that are displayed to an end user.
-     *       In this mode, differences in uppercase and lowercase letters,
-     *       accented characters, and other differences specific to the
-     *       locale are considered when doing string comparisons.

-     *
CollatorMode.MATCHING: sets collation options for
-     *       uses such as determining if two strings are equivalent.
-     *       In this mode, differences in uppercase and lower case letters,
-     *       accented characters, and so on are ignored when doing string
-     *       comparisons.

-     *

+     *
The flash.globalization.Collator class uses the underlying operating
+     * system for the formatting functionality and to supply locale
+     * specific data.
+     * On some operating systems, the flash.globalization classes are
+     * unsupported. On these systems the wrapper class provides fallback
+     * functionality for string comparison.

      *
-     *
For more details and examples of using these two modes, please
-     *  see the documentation for the
-     *  flash.globalization.Collator class.

-     *
-     *
The locale for this class is supplied by the locale
-     *  style. The locale style can be set in several ways:

-     *
-     *

-     *
Inheriting the style from a UIComponent by calling
-     *          the UIComponent's addStyleClient method with
-     *          an instance of this object as the parameter.

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

-     *  <fx:Declarations>
-     *         <s:SortingCollator id="collator" />
-     *  </fx:Declarations>
-     *

-     *

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

-     *  <fx:Declarations>
-     *      <s:SortingCollator id="collator_german" locale="de-DE" />
-     *  </fx:Declarations>
-     *

-     *

-     *
Calling the setStyle method, e.g.
-     *              collator.setStyle("locale", "de-DE")

-     *

-     *
-     *
If the locale style is not set by one of the above
-     *  techniques, the
-     *  methods of this class that depend on the locale set the
-     *  lastOperationStatus property to
-     *  spark.globalization.LastOperationStatus.LOCALE_UNDEFINED_ERROR.

-     *
-     *  @param initialMode Sets the initial collation options for two use
-     *  cases: sorting and matching.
-     *
-     *  @see flash.globalization.Collator
-     *  @see spark.globalization.LastOperationStatus
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function CollatorBase(initialMode:String)
-    {
-        super();
-
-        this.initialMode = initialMode;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    // Actual instance of the working flash.globalization.Collator instance.
-    private var _g11nWorkingInstance:flash.globalization.Collator;
-
-    /**
-     *  @private
-     *  If the g11nWorkingInstance has not been defined. Call
-     *  ensureStyleSource to ensure that there is a styleParent. If there is
-     *  not a style parent, then this instance will be added as a style client
-     *  to the topLevelApplication. As a side effect of this, the styleChanged
-     *  method will be called and if there is a locale style defined for the
-     *  topLevelApplication, the createWorkingInstance method will be
-     *  executed creating a g11nWorkingInstance.
-     */
-    private function get g11nWorkingInstance ():
-        flash.globalization.Collator
-    {
-        if (!_g11nWorkingInstance)
-            ensureStyleSource();
-
-        return _g11nWorkingInstance;
-    }
-
-    private function set g11nWorkingInstance
-        (flashCollator:flash.globalization.Collator): void
-    {
-        _g11nWorkingInstance = flashCollator;
-    }
-
-    // Cache for the given initialMode through the constructor.
-    private var initialMode:String = null;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  actualLocaleIDName
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  @inheritDoc
-     *
-     *  @see flash.globalization.Collator.actualLocaleIDName
-     *  @see #CollatorBase()
+     * @see flash.globalization.Collator
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    override public function get actualLocaleIDName():String
+    public class CollatorBase extends GlobalizationBase
     {
-        if (g11nWorkingInstance)
-            return g11nWorkingInstance.actualLocaleIDName;
-
-        if ((localeStyle === undefined) || (localeStyle === null))
-        {
-            fallbackLastOperationStatus
-                                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
-            return undefined;
-        }
-
-        fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
-
-        return "en-US";
-    }
-
-    //----------------------------------
-    //  lastOperationStatus
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  @inheritDoc
-     *
-     *  @see spark.globalization.LastOperationStatus
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    override public function get lastOperationStatus():String
-    {
-        return g11nWorkingInstance ?
-            g11nWorkingInstance.lastOperationStatus :
-            fallbackLastOperationStatus;
-    }
-
-    //----------------------------------
-    //  useFallback
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  @private
-     */
-    override mx_internal function get useFallback():Boolean
-    {
-        return g11nWorkingInstance == null;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  ignoreCase
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  When this property is set to true, identical strings and strings that
-     *  differ only in the case of the letters are evaluated as equal.
-     *
-     *
The default value is true when the
-     *  CollatorBase()  constructor's initialMode
-     *  parameter is set to  Collator.MATCHING. false
-     *  when the CollatorBase()  constructor's
-     *  initialMode parameter is set to
-     *  Collator.SORTING.

-     *
-     *  @see #compare()
-     *  @see #equals()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get ignoreCase():Boolean
-    {
-        return getBasicProperty(properties, IGNORE_CASE);
-    }
-
-    public function set ignoreCase(value:Boolean):void
-    {
-        setBasicProperty(properties, IGNORE_CASE, value);
-    }
-
-    //----------------------------------
-    //  ignoreCharacterWidth
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  When this property is true, full-width and half-width forms of some
-     *  Chinese and Japanese characters are evaluated as equal.
-     *
-     *
For compatibility with existing standards for Chinese and Japanese
-     *  character sets, Unicode provides character codes for both full-width
-     *  and half width-forms of some characters.
-     *  For example, when the ignoreCharacterWidth property is
-     *  set to true,
-     *  compare("Ａｱ", "Aア")
-     *  returns true.

-     *
-     *
If the ignoreCharacterWidth property is set to
-     *  false, then full-width and half-width forms are not
-     *  equal to one another.

-     *
-     *
The default value is true when the
-     *  CollatorBase() constructor's initialMode
-     *  parameter is set to Collator.MATCHING.
-     *  false when the CollatorBase()
-     *  constructor's initialMode parameter is set to
-     *  Collator.SORTING.

-     *
-     *  @see #compare()
-     *  @see #equals()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get ignoreCharacterWidth():Boolean
-    {
-        return getBasicProperty(properties, IGNORE_CHARACTER_WIDTH);
-    }
-
-    public function set ignoreCharacterWidth(value:Boolean):void
-    {
-        setBasicProperty(properties, IGNORE_CHARACTER_WIDTH, value);
-    }
-
-    //----------------------------------
-    //  ignoreDiacritics
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  When this property is set to true, strings that use the same base
-     *  characters but different accents or other diacritic marks are
-     *  evaluated as equal.
-     *
-     *  For example compare("coté", "côte") returns
-     *  true when the ignoreDiacritics property is
-     *  set to true.
-     *
-     *
When the ignoreDiacritics is set to
-     *  false then base characters with diacritic marks or
-     *  accents are not considered equal to one another.

-     *
-     *
-     *
The default value is true when the
-     *  CollatorBase() constructor's initialMode
-     *  parameter is set to Collator.MATCHING.
-     *  false when the CollatorBase()
-     *  constructor's initialMode parameter is set to
-     *  Collator.SORTING.

-     *
-     *  @see #compare()
-     *  @see #equals()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get ignoreDiacritics():Boolean
-    {
-        return getBasicProperty(properties, IGNORE_DIACRITICS);
-    }
-
-    public function set ignoreDiacritics(value:Boolean):void
-    {
-        setBasicProperty(properties, IGNORE_DIACRITICS, value);
-    }
-
-    //----------------------------------
-    //  ignoreKanaType
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  When this property is set to true, strings that differ only by the
-     *  type of kana character being used are treated as equal.
-     *
-     *  For example,
-     *  compare("カナ", "かな")
-     *  returns true when the ignoreKanaType
-     *  property is set to true.
-     *
-     *
If the ignoreKanaType is set to false
-     *  then hiragana and katakana characters that refer to the same syllable
-     *  are not equal to one another.

-     *
-     *
The default value is true when the
-     *  CollatorBase() constructor's initialMode
-     *  parameter is set to Collator.MATCHING.
-     *  false when the CollatorBase()
-     *  constructor's initialMode parameter is set to
-     *  Collator.SORTING.

-     *
-     *  @see #compare()
-     *  @see #equals()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get ignoreKanaType():Boolean
-    {
-        return getBasicProperty(properties, IGNORE_KANA_TYPE);
-    }
-
-    public function set ignoreKanaType(value:Boolean):void
-    {
-        setBasicProperty(properties, IGNORE_KANA_TYPE, value);
-    }
-
-    //----------------------------------
-    //  ignoreSymbols
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  When this property is set to is true, symbol characters such as
-     *  spaces, currency symbols, math symbols, and other types of symbols
-     *  are ignored when sorting or matching.
-     *
-     *  For example the strings "OBrian", "O'Brian", and "O Brian" would all
-     *  be treated as equal when the ignoreSymbols property is
-     *  set to true.
-     *
-     *
The default value is true when the
-     *  CollatorBase() constructor's initialMode
-     *  parameter is set to Collator.MATCHING.
-     *  false when the CollatorBase()
-     *  constructor's initialMode parameter is set to
-     *  Collator.SORTING.

-     *
-     *  @see #compare()
-     *  @see #equals()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get ignoreSymbols():Boolean
-    {
-        return getBasicProperty(properties, IGNORE_SYMBOLS);
-    }
-
-    public function set ignoreSymbols(value:Boolean):void
-    {
-        setBasicProperty(properties, IGNORE_SYMBOLS, value);
-    }
-
-    //----------------------------------
-    //  numericComparison
-    //----------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  Controls how numeric values embedded in strings are handled during
-     *  string comparison.
-     *
-     *
When the numericComparison property is set to
-     *  true, the compare method converts numbers that appear in
-     *  strings to numerical values for comparison.

-     *
-     *
When this property is set to false, the comparison
-     *  treats numbers as character codes and sort them according to the
-     *  rules for sorting characters in the specified locale.

-     *
-     *
For example, when this property is true for the locale ID "en-US",
-     *  then the strings "version1", "version10", and "version2" are sorted
-     *  into the following order: version1 < version2 < version10.

-     *
-     *
When this property is false for "en-US", those same strings
-     *  are sorted into the following order: version1 < version10 <
-     *  version2.

-     *
-     *  @default false
-     *
-     *  @see #compare()
-     *  @see #equals()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function get numericComparison():Boolean
-    {
-        return getBasicProperty(properties, NUMERIC_COMPARISON);
-    }
-
-    public function set numericComparison(value:Boolean):void
-    {
-        setBasicProperty(properties, NUMERIC_COMPARISON, value);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override mx_internal function createWorkingInstance():void
-    {
-        if ((localeStyle === undefined) || (localeStyle === null))
-        {
-            fallbackLastOperationStatus
-                                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
-            g11nWorkingInstance = null;
-            properties = null;
-            return;
-        }
-
-        if (enforceFallback)
-        {
+        include "../../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class Constants
+        //
+        //--------------------------------------------------------------------------
+
+        // Names of common basic properties of
+        // spark.utils.CollatorBase and flash.globalization.Collator
+        private static const IGNORE_CASE:String = "ignoreCase";
+        private static const IGNORE_CHARACTER_WIDTH:String = "ignoreCharacterWidth";
+        private static const IGNORE_DIACRITICS:String = "ignoreDiacritics";
+        private static const IGNORE_KANA_TYPE:String = "ignoreKanaType";
+        private static const IGNORE_SYMBOLS:String = "ignoreSymbols";
+        private static const NUMERIC_COMPARISON:String = "numericComparison";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Constructs a new CollatorBase object to provide string comparisons
+         *  according to the conventions of a specified locale.
+         *
+         *
The initialMode parameter sets the initial collation
+         *  options for two use cases: sorting and matching.
+         *  It can be set to one of the two following values:

+         *
+         *

+         *
CollatorMode.SORTING: sets the collation options for
+         *       general linguistic sorting uses such as sorting a list of
+         *       text strings that are displayed to an end user.
+         *       In this mode, differences in uppercase and lowercase letters,
+         *       accented characters, and other differences specific to the
+         *       locale are considered when doing string comparisons.

+         *
CollatorMode.MATCHING: sets collation options for
+         *       uses such as determining if two strings are equivalent.
+         *       In this mode, differences in uppercase and lower case letters,
+         *       accented characters, and so on are ignored when doing string
+         *       comparisons.

+         *

+         *
+         *
For more details and examples of using these two modes, please
+         *  see the documentation for the
+         *  flash.globalization.Collator class.

+         *
+         *
The locale for this class is supplied by the locale
+         *  style. The locale style can be set in several ways:

+         *
+         *

+         *
Inheriting the style from a UIComponent by calling
+         *          the UIComponent's addStyleClient method with
+         *          an instance of this object as the parameter.

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

+         *  <fx:Declarations>
+         *         <s:SortingCollator id="collator" />
+         *  </fx:Declarations>
+         *

+         *

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

+         *  <fx:Declarations>
+         *      <s:SortingCollator id="collator_german" locale="de-DE" />
+         *  </fx:Declarations>
+         *

+         *

+         *
Calling the setStyle method, e.g.
+         *              collator.setStyle("locale", "de-DE")

+         *

+         *
+         *
If the locale style is not set by one of the above
+         *  techniques, the
+         *  methods of this class that depend on the locale set the
+         *  lastOperationStatus property to
+         *  spark.globalization.LastOperationStatus.LOCALE_UNDEFINED_ERROR.

+         *
+         *  @param initialMode Sets the initial collation options for two use
+         *  cases: sorting and matching.
+         *
+         *  @see flash.globalization.Collator
+         *  @see spark.globalization.LastOperationStatus
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function CollatorBase(initialMode:String)
+        {
+            super();
+
+            this.initialMode = initialMode;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Variables
+        //
+        //--------------------------------------------------------------------------
+
+        // Actual instance of the working flash.globalization.Collator instance.
+        private var _g11nWorkingInstance:flash.globalization.Collator;
+
+        /**
+         *  @private
+         *  If the g11nWorkingInstance has not been defined. Call
+         *  ensureStyleSource to ensure that there is a styleParent. If there is
+         *  not a style parent, then this instance will be added as a style client
+         *  to the topLevelApplication. As a side effect of this, the styleChanged
+         *  method will be called and if there is a locale style defined for the
+         *  topLevelApplication, the createWorkingInstance method will be
+         *  executed creating a g11nWorkingInstance.
+         */
+        private function get g11nWorkingInstance ():
+            flash.globalization.Collator
+        {
+            if (!_g11nWorkingInstance)
+                ensureStyleSource();
+
+            return _g11nWorkingInstance;
+        }
+
+        private function set g11nWorkingInstance
+            (flashCollator:flash.globalization.Collator): void
+        {
+            _g11nWorkingInstance = flashCollator;
+        }
+
+        // Cache for the given initialMode through the constructor.
+        private var initialMode:String = null;
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden Properties
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  actualLocaleIDName
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  @inheritDoc
+         *
+         *  @see flash.globalization.Collator.actualLocaleIDName
+         *  @see #CollatorBase()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        override public function get actualLocaleIDName():String
+        {
+            if (g11nWorkingInstance)
+                return g11nWorkingInstance.actualLocaleIDName;
+
+            if ((localeStyle === undefined) || (localeStyle === null))
+            {
+                fallbackLastOperationStatus
+                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+                return undefined;
+            }
+
+            fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
+
+            return "en-US";
+        }
+
+        //----------------------------------
+        //  lastOperationStatus
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  @inheritDoc
+         *
+         *  @see spark.globalization.LastOperationStatus
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        override public function get lastOperationStatus():String
+        {
+            return g11nWorkingInstance ?
+                g11nWorkingInstance.lastOperationStatus :
+                fallbackLastOperationStatus;
+        }
+
+        //----------------------------------
+        //  useFallback
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  @private
+         */
+        override mx_internal function get useFallback():Boolean
+        {
+            return g11nWorkingInstance == null;
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Properties
+        //
+        //--------------------------------------------------------------------------
+
+        //----------------------------------
+        //  ignoreCase
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  When this property is set to true, identical strings and strings that
+         *  differ only in the case of the letters are evaluated as equal.
+         *
+         *
The default value is true when the
+         *  CollatorBase()  constructor's initialMode
+         *  parameter is set to  Collator.MATCHING. false
+         *  when the CollatorBase()  constructor's
+         *  initialMode parameter is set to
+         *  Collator.SORTING.

+         *
+         *  @see #compare()
+         *  @see #equals()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function get ignoreCase():Boolean
+        {
+            return getBasicProperty(properties, IGNORE_CASE);
+        }
+
+        public function set ignoreCase(value:Boolean):void
+        {
+            setBasicProperty(properties, IGNORE_CASE, value);
+        }
+
+        //----------------------------------
+        //  ignoreCharacterWidth
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  When this property is true, full-width and half-width forms of some
+         *  Chinese and Japanese characters are evaluated as equal.
+         *
+         *
For compatibility with existing standards for Chinese and Japanese
+         *  character sets, Unicode provides character codes for both full-width
+         *  and half width-forms of some characters.
+         *  For example, when the ignoreCharacterWidth property is
+         *  set to true,
+         *  compare("Ａｱ", "Aア")
+         *  returns true.

+         *
+         *
If the ignoreCharacterWidth property is set to
+         *  false, then full-width and half-width forms are not
+         *  equal to one another.

+         *
+         *
The default value is true when the
+         *  CollatorBase() constructor's initialMode
+         *  parameter is set to Collator.MATCHING.
+         *  false when the CollatorBase()
+         *  constructor's initialMode parameter is set to
+         *  Collator.SORTING.

+         *
+         *  @see #compare()
+         *  @see #equals()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function get ignoreCharacterWidth():Boolean
+        {
+            return getBasicProperty(properties, IGNORE_CHARACTER_WIDTH);
+        }
+
+        public function set ignoreCharacterWidth(value:Boolean):void
+        {
+            setBasicProperty(properties, IGNORE_CHARACTER_WIDTH, value);
+        }
+
+        //----------------------------------
+        //  ignoreDiacritics
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  When this property is set to true, strings that use the same base
+         *  characters but different accents or other diacritic marks are
+         *  evaluated as equal.
+         *
+         *  For example compare("coté", "côte") returns
+         *  true when the ignoreDiacritics property is
+         *  set to true.
+         *
+         *
When the ignoreDiacritics is set to
+         *  false then base characters with diacritic marks or
+         *  accents are not considered equal to one another.

+         *
+         *
+         *
The default value is true when the
+         *  CollatorBase() constructor's initialMode
+         *  parameter is set to Collator.MATCHING.
+         *  false when the CollatorBase()
+         *  constructor's initialMode parameter is set to
+         *  Collator.SORTING.

+         *
+         *  @see #compare()
+         *  @see #equals()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function get ignoreDiacritics():Boolean
+        {
+            return getBasicProperty(properties, IGNORE_DIACRITICS);
+        }
+
+        public function set ignoreDiacritics(value:Boolean):void
+        {
+            setBasicProperty(properties, IGNORE_DIACRITICS, value);
+        }
+
+        //----------------------------------
+        //  ignoreKanaType
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  When this property is set to true, strings that differ only by the
+         *  type of kana character being used are treated as equal.
+         *
+         *  For example,
+         *  compare("カナ", "かな")
+         *  returns true when the ignoreKanaType
+         *  property is set to true.
+         *
+         *
If the ignoreKanaType is set to false
+         *  then hiragana and katakana characters that refer to the same syllable
+         *  are not equal to one another.

+         *
+         *
The default value is true when the
+         *  CollatorBase() constructor's initialMode
+         *  parameter is set to Collator.MATCHING.
+         *  false when the CollatorBase()
+         *  constructor's initialMode parameter is set to
+         *  Collator.SORTING.

+         *
+         *  @see #compare()
+         *  @see #equals()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function get ignoreKanaType():Boolean
+        {
+            return getBasicProperty(properties, IGNORE_KANA_TYPE);
+        }
+
+        public function set ignoreKanaType(value:Boolean):void
+        {
+            setBasicProperty(properties, IGNORE_KANA_TYPE, value);
+        }
+
+        //----------------------------------
+        //  ignoreSymbols
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  When this property is set to is true, symbol characters such as
+         *  spaces, currency symbols, math symbols, and other types of symbols
+         *  are ignored when sorting or matching.
+         *
+         *  For example the strings "OBrian", "O'Brian", and "O Brian" would all
+         *  be treated as equal when the ignoreSymbols property is
+         *  set to true.
+         *
+         *
The default value is true when the
+         *  CollatorBase() constructor's initialMode
+         *  parameter is set to Collator.MATCHING.
+         *  false when the CollatorBase()
+         *  constructor's initialMode parameter is set to
+         *  Collator.SORTING.

+         *
+         *  @see #compare()
+         *  @see #equals()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function get ignoreSymbols():Boolean
+        {
+            return getBasicProperty(properties, IGNORE_SYMBOLS);
+        }
+
+        public function set ignoreSymbols(value:Boolean):void
+        {
+            setBasicProperty(properties, IGNORE_SYMBOLS, value);
+        }
+
+        //----------------------------------
+        //  numericComparison
+        //----------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  Controls how numeric values embedded in strings are handled during
+         *  string comparison.
+         *
+         *
When the numericComparison property is set to
+         *  true, the compare method converts numbers that appear in
+         *  strings to numerical values for comparison.

+         *
+         *
When this property is set to false, the comparison
+         *  treats numbers as character codes and sort them according to the
+         *  rules for sorting characters in the specified locale.

+         *
+         *
For example, when this property is true for the locale ID "en-US",
+         *  then the strings "version1", "version10", and "version2" are sorted
+         *  into the following order: version1 < version2 < version10.

+         *
+         *
When this property is false for "en-US", those same strings
+         *  are sorted into the following order: version1 < version10 <
+         *  version2.

+         *
+         *  @default false
+         *
+         *  @see #compare()
+         *  @see #equals()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function get numericComparison():Boolean
+        {
+            return getBasicProperty(properties, NUMERIC_COMPARISON);
+        }
+
+        public function set numericComparison(value:Boolean):void
+        {
+            setBasicProperty(properties, NUMERIC_COMPARISON, value);
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden Methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        override mx_internal function createWorkingInstance():void
+        {
+            if ((localeStyle === undefined) || (localeStyle === null))
+            {
+                fallbackLastOperationStatus
+                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+                g11nWorkingInstance = null;
+                properties = null;
+                return;
+            }
+
+            if (enforceFallback)
+            {
+                fallbackInstantiate();
+                g11nWorkingInstance = null;
+                return;
+            }
+
+            g11nWorkingInstance =
+                new flash.globalization.Collator(localeStyle, initialMode);
+            if (g11nWorkingInstance
+                && (g11nWorkingInstance.lastOperationStatus
+                    != LastOperationStatus.UNSUPPORTED_ERROR))
+            {
+                properties = g11nWorkingInstance;
+                propagateBasicProperties(g11nWorkingInstance);
+                return;
+            }
+
             fallbackInstantiate();
             g11nWorkingInstance = null;
-            return;
-        }
-
-        g11nWorkingInstance =
-                    new flash.globalization.Collator(localeStyle, initialMode);
-        if (g11nWorkingInstance
-                && (g11nWorkingInstance.lastOperationStatus
-                                    != LastOperationStatus.UNSUPPORTED_ERROR))
-        {
-            properties = g11nWorkingInstance;
-            propagateBasicProperties(g11nWorkingInstance);
-            return;
-        }
-
-        fallbackInstantiate();
-        g11nWorkingInstance = null;
-
-        if (fallbackLastOperationStatus == LastOperationStatus.NO_ERROR)
-        {
-            fallbackLastOperationStatus
-                                = LastOperationStatus.USING_FALLBACK_WARNING;
-        }
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Methods
-    //
-    //--------------------------------------------------------------------------
-
-    [Bindable("change")]
-
-    /**
-     *  Compares two strings and returns an integer value indicating whether
-     *  the first string is less than, equal to, or greater than the second
-     *  string.
-     *
-     *  The comparison uses the sort order rules for the locale sytle that is
-     *  in effect when the compare method is called.
-     *
-     *  @param string1 First comparison string.
-     *  @param string2 Second comparison string.
-     *  @return An integer value indicating whether the first string is less
-     *         than, equal to, or greater than the second string.2
-     *

-     *
If the return value is negative, string1
-     *                  is less than string2.

-     *
If the return value is zero, string1 is
-     *                  equal to string2.

-     *
If the return value is positive, string1
-     *                  is larger than string2.

-     *

-     *
-     *  @see #CollatorBase()
-     *  @see #equals()
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function compare(string1:String, string2:String):int
-    {
-        if (g11nWorkingInstance)
-            return g11nWorkingInstance.compare(string1, string2);
-
-        if ((localeStyle === undefined) || (localeStyle === null))
-        {
-            fallbackLastOperationStatus
-                                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
-            return undefined;
-        }
-
-        fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
-
+
+            if (fallbackLastOperationStatus == LastOperationStatus.NO_ERROR)
+            {
+                fallbackLastOperationStatus
+                = LastOperationStatus.USING_FALLBACK_WARNING;
+            }
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Methods
+        //
+        //--------------------------------------------------------------------------
+
+        [Bindable("change")]
+
+        /**
+         *  Compares two strings and returns an integer value indicating whether
+         *  the first string is less than, equal to, or greater than the second
+         *  string.
+         *
+         *  The comparison uses the sort order rules for the locale sytle that is
+         *  in effect when the compare method is called.
+         *
+         *  @param string1 First comparison string.
+         *  @param string2 Second comparison string.
+         *  @return An integer value indicating whether the first string is less
+         *         than, equal to, or greater than the second string.
+         *

+         *
If the return value is negative, string1
+         *                  is less than string2 or string2 is null.

+         *
If the return value is zero, string1 is
+         *                  equal to string2.

+         *
If the return value is positive, string1
+         *                  is larger than string2 or string1 is null.

+         *

+         *
+         *  @see #CollatorBase()
+         *  @see #equals()
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function compare(string1:String, string2:String):int
+        {
+            if (g11nWorkingInstance)
+            {
+                // The compare function below will throw an Argument error if either string1 or
+                // string2 is null so handle those cases here.
+                if (string1 === null && string2 === null)
+                    return 0;
+
+                if (string1 === null)
+                    return 1;
+
+                if (string2 === null)
+                    return -1;
+
+                return g11nWorkingInstance.compare(string1, string2);
+            }
+
+            if ((localeStyle === undefined) || (localeStyle === null))
+            {
+                fallbackLastOperationStatus
+                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+                return undefined;
+            }
+
+            fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
+
             return ObjectUtil.stringCompare(
-                                    string1, string2, properties.ignoreCase);
-    }
-
-    [Bindable("change")]
-
-    /**
-     *  Compares two strings and returns a Boolean value indicating whether
-     *  the strings are equal.
-     *
-     *  The comparison uses the sort order rules for the locale ID that was
-     *  specified in the CollatorBase() constructor.
-     *
-     *  @param string1 First comparison string.
-     *  @param string2 Second comparison string.
-     *  @return A Boolean value indicating whether the strings are equal
-     *         (true) or unequal (false).
-     *
-     *  @see #CollatorBase()
-     *  @see #compare
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.1
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public function equals(string1:String, string2:String):Boolean
-    {
-        if (g11nWorkingInstance)
-            return g11nWorkingInstance.equals(string1, string2);
-
-        if ((localeStyle === undefined) || (localeStyle === null))
-        {
-            fallbackLastOperationStatus
-                                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
-            return undefined;
-        }
-
-        fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
-
-        return ObjectUtil.stringCompare(
-                                string1, string2, properties.ignoreCase) == 0;
-    }
-
-    /**
-     *  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
-     *  @playerversion AIR 2.5
-     *  @productversion Flex 4.5
-     */
-    public static function getAvailableLocaleIDNames():Vector.<String>
-    {
-        const locales:Vector.<String>
-                    = flash.globalization.Collator.getAvailableLocaleIDNames();
-
-        return locales ? locales : new Vector.<String>["en-US"];
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Private Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Imaginary constructor of FallbackCollator.
-     *
-     *  All it does is to check if the given parameters are correct and do
-     *  nothing.
-     */
-    private function fallbackInstantiate():void
-    {
-        const validInitialMode:Boolean =
-            (initialMode == CollatorMode.MATCHING)
-                                || (initialMode == CollatorMode.SORTING);
-
-        fallbackLastOperationStatus = validInitialMode ?
-            LastOperationStatus.NO_ERROR :
-            LastOperationStatus.INVALID_ATTR_VALUE;
-
-        properties =
-            {
-                ignoreCase: (initialMode == CollatorMode.MATCHING),
-                ignoreCharacterWidth: false,
-                ignoreDiacritics: false,
-                ignoreKanaType: false,
-                ignoreSymbols: false,
-                numericComparison: false
-            };
-
-        propagateBasicProperties(properties);
+                string1, string2, properties.ignoreCase);
+        }
+
+        [Bindable("change")]
+
+        /**
+         *  Compares two strings and returns a Boolean value indicating whether
+         *  the strings are equal.
+         *
+         *  The comparison uses the sort order rules for the locale ID that was
+         *  specified in the CollatorBase() constructor.
+         *
+         *  @param string1 First comparison string.
+         *  @param string2 Second comparison string.
+         *  @return A Boolean value indicating whether the strings are equal
+         *         (true) or unequal (false).
+         *
+         *  @see #CollatorBase()
+         *  @see #compare
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.1
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public function equals(string1:String, string2:String):Boolean
+        {
+            if (g11nWorkingInstance)
+            {
+                // The equals function below will throw an Argument error if either string1 or
+                // string2 is null so handle those cases here.
+                if (string1 === null && string2 === null)
+                    return true;
+
+                if (string1 === null || string2 === null)
+                    return false;
+
+                return g11nWorkingInstance.equals(string1, string2);
+            }
+
+            if ((localeStyle === undefined) || (localeStyle === null))
+            {
+                fallbackLastOperationStatus
+                = LastOperationStatus.LOCALE_UNDEFINED_ERROR;
+                return undefined;
+            }
+
+            fallbackLastOperationStatus = LastOperationStatus.NO_ERROR;
+
+            return ObjectUtil.stringCompare(
+                string1, string2, properties.ignoreCase) == 0;
+        }
+
+        /**
+         *  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
+         *  @playerversion AIR 2.5
+         *  @productversion Flex 4.5
+         */
+        public static function getAvailableLocaleIDNames():Vector.<String>
+        {
+            const locales:Vector.<String>
+            = flash.globalization.Collator.getAvailableLocaleIDNames();
+
+            return locales ? locales : new Vector.<String>["en-US"];
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Private Methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         *  Imaginary constructor of FallbackCollator.
+         *
+         *  All it does is to check if the given parameters are correct and do
+         *  nothing.
+         */
+        private function fallbackInstantiate():void
+        {
+            const validInitialMode:Boolean =
+                (initialMode == CollatorMode.MATCHING)
+                || (initialMode == CollatorMode.SORTING);
+
+            fallbackLastOperationStatus = validInitialMode ?
+                LastOperationStatus.NO_ERROR :
+                LastOperationStatus.INVALID_ATTR_VALUE;
+
+            properties =
+                {
+                    ignoreCase: (initialMode == CollatorMode.MATCHING),
+                    ignoreCharacterWidth: false,
+                    ignoreDiacritics: false,
+                    ignoreKanaType: false,
+                    ignoreSymbols: false,
+                    numericComparison: false
+                };
+
+            propagateBasicProperties(properties);
+        }
     }
 }
-}


Change 20070212-hqm-2 by hqm@IBM-112E6A12815 on 2007-02-12 17:21:57 EST
    in /cygdrive/c/users/hqm/openlaszlo/trunk/WEB-INF/lps/lfc

Summary:  fix for inifinte loop in debugger check on datasets

New Features:

Bugs Fixed: infinte loop in debug mode

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

Documentation:

Release Notes:

Details:

Tests:

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

--- WEB-INF/lps/lfc/glue/LaszloInitiator.as
+++ WEB-INF/lps/lfc/glue/LaszloInitiator.as
@@ -150,6 +150,7 @@
     }
 }

+
 function lzAddLocalData(name, d) {
-    return new LzDataset(null, {name: name, initialdata: d });
+    return new LzDataset(canvas, {name: name, initialdata: d });
 }


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

--- frameworks/projects/advancedgrids/src/mx/skins/halo/AdvancedDataGridColumnWrongDropIndicator.as
+++ frameworks/projects/advancedgrids/src/mx/skins/halo/AdvancedDataGridColumnWrongDropIndicator.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 mx.skins.halo
 {


FIXED - FLEX-34231 StageText displays wrong text

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ScrollableStageText.as
@@ -1736,14 +1736,20 @@
         {
             restoreStageText();
         }
-        else if (savedSelectionAnchorIndex > 0 || savedSelectionActiveIndex > 0)
-        {
-            // Even if the StageText has been retrieved from the cache, its
-            // selection is not preserved. Restore the selection if necessary.
-            if (savedSelectionAnchorIndex <= _text.length && savedSelectionActiveIndex <= _text.length)
-                stageText.selectRange(savedSelectionAnchorIndex, savedSelectionActiveIndex);
-            savedSelectionAnchorIndex = 0;
-            savedSelectionActiveIndex = 0;
+        else
+        {
+            //always restore text, even if recycled, as it may have changed when the SST was not on stage cf.   https://issues.apache.org/jira/browse/FLEX-34231
+            // for now, we ignore external changes to other props
+            stageText.text = _text ;
+            if (savedSelectionAnchorIndex > 0 || savedSelectionActiveIndex > 0)
+            {
+                // Even if the StageText has been retrieved from the cache, its
+                // selection is not preserved. Restore the selection if necessary.
+                if (savedSelectionAnchorIndex <= _text.length && savedSelectionActiveIndex <= _text.length)
+                    stageText.selectRange(savedSelectionAnchorIndex, savedSelectionActiveIndex);
+                savedSelectionAnchorIndex = 0;
+                savedSelectionActiveIndex = 0;
+            }
         }

         if (stageText != null)