Transferred from the Adobe Open Source Subversion Repository

Revision: 9358
Author:   dsubrama@adobe.com
Date:     2009-08-17T23:51:20.104007Z

Log Message:
-----------
More work to support FXG 2.0 in the MXML Graphics library.

1. Switch blendMode default from layer to normal. Before, we did some trickery under the covers, where even though the default blendMode was layer, we actually only set it to layer when it resulted in a rendering difference (ie: when alpha was > 0 < 1 and other overlapping cases). Now, FXG 2.0 mandates blendMode default is normal – and we don’t have to do that trickery because the FXG exporters are smarter and will set blendMode explicitly to layer when necessary. This change is for Group and all graphic primitives.

2. I’ve added new enumerations to blendMode and maskType as well as a couple of new properties as mandated by FXG 2.0. There is additional work that needs to happen there that I’ll be doing next week.

3. I’ve renamed Group’s resizeMode enumerations from ‘normal’, ‘scale’ to ‘noScale’, ‘scale’.

4. I’ve renamed BitmapImage’s resizeMode enumerations from ‘normal’, ‘scale’, ‘repeat’ to ‘noScale’, ‘scale’, ‘repeat’. The default value for BitmapImage.resizeMode went from ‘repeat’ to ‘scale’. Additionally, BitmapImage.repeat property has now been eliminated - use resizeMode="repeat".

5. I’ve deprecated BitmapFill’s ‘repeat’ property. I’ve added a ‘resizeMode’ property to BitmapFill with the same enumerations, defaults and behavior as BitmapImage. I’ve also moved BitmapImageResizeMode from spark.primitives to mx.graphics. I’ve also renamed BitmapImageResizeMode.as to BitmapResizeMode.as (a PARB-approved rename).

QE notes:  Yes! Joan and I have cycloned numerous times and QA in on-board with the changes.
Doc notes: Yes
Bugs: Several
Reviewer: Evtim/Glenn
Tests run: Pretty much the entire mustella run for Halo and Spark components
Is noteworthy for integration: Yes

Modified Paths:
--------------
<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/sparkskins/src/mx/skins/spark/StepperIncrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VScrollBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/primitives/examples/BitmapImageExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ResizeMode.as</path>
<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/airframework/src/spark/skins/spark/windowChrome/GripperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/StepperDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/DropDownListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MinimizeButtonSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImageResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/RestoreButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MaximizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/halo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacCloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacMinimizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/TextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacMaximizeButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/MaskType.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/CloseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ToggleButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarDownButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/TitleBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/spark-air-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/CheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/HSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/RadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ButtonBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ScrollBarUpButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacTitleBarSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/graphics/BitmapFillMode.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapFillMode.as
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.graphics
+{
+
+/**
+ *  An enum of the resize modes that determine how a BitmapImage
+ *  fills in the dimensions specified by the layout system.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public final class BitmapResizeMode
+{
+    /**
+     *  The bitmap ends at the edge of the region.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const NOSCALE:String = "noScale";
+
+    /**
+     *  The bitmap is repeated to fill the region.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const REPEAT:String = "repeat";
+
+    /**
+     *  The bitmap fill stretches to fill the region.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static const SCALE:String = "scale";
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8464
Author:   hmuller@adobe.com
Date:     2009-07-08T21:45:36.063637Z

Log Message:
-----------
Removed the SpriteVisualElement mirror and dir properties.   They were supposed to have been eradicated in SVN 6077 when the mirroring feature was removed.

Updated ScrollerLayout to correctly show auto scrollbars when the viewport has a scale/rotate transform.

QE Notes: Mustella tests pass
Doc Notes:
Bugs:  sdk-19702
Reviewer: Chet

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/components/supportClasses/ScrollerLayout.as</path>

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

--- frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
+++ frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
@@ -564,37 +564,6 @@
         invalidateParentSizeAndDisplayList();
     }

-    //----------------------------------
-    //  mirror
-    //----------------------------------
-
-    private var _mirror:Boolean;
-
-    public function get mirror():Boolean
-    {
-        return _mirror;
-    }
-
-    public function set mirror(value:Boolean):void
-    {
-        if (value == _mirror)
-            return;
-        _mirror = value;
-    }
-
-    //----------------------------------
-    //  dir
-    //----------------------------------
-
-    public function get dir():String
-    {
-        return "ltr"
-    }
-
-    public function set dir(value:String):void
-    {
-    }
-
     //----------------------------------
     //  viewWidth
     //----------------------------------


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -19,7 +19,6 @@
 import flash.ui.Keyboard;

 import mx.components.baseClasses.GroupBase;
-import mx.graphics.IGraphicElement;

 import mx.containers.utilityClasses.Flex;
 import mx.events.PropertyChangeEvent;
@@ -40,7 +39,7 @@

     private static function calculatePercentHeight( layoutItem:ILayoutItem, height:Number ):Number
     {
-    	var percentHeight:Number = LayoutItemHelper.pinBetween(layoutItem.percentSize.y * 0.01 * height,
+    	var percentHeight:Number = LayoutItemHelper.pinBetween(layoutItem.percentHeight * 0.01 * height,
     	                                                       layoutItem.minSize.y,
     	                                                       layoutItem.maxSize.y );
     	return percentHeight < height ? percentHeight : height;
@@ -936,11 +935,11 @@
         {
             if (hasPercentWidth(layoutItem))
             {
-                totalPercentWidth += layoutItem.percentSize.x;
+                totalPercentWidth += layoutItem.percentWidth;

                 childInfo = new HLayoutItemFlexChildInfo();
                 childInfo.layoutItem = layoutItem;
-                childInfo.percent    = layoutItem.percentSize.x;
+                childInfo.percent    = layoutItem.percentWidth;
                 childInfo.min        = layoutItem.minSize.x;
                 childInfo.max        = layoutItem.maxSize.x;


Change 20080601-bargull-Vzq by bargull@dell--p4--2-53 on 2008-06-01 00:56:07
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Add nsprefix support to swf9

New Features:

Bugs Fixed: LPP-6078

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

Documentation:

Release Notes:

Details:
Added support for nsprefix to the xml-translator.

Tests:

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

--- WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzXMLTranslator.as
@@ -14,16 +14,17 @@

 public class LzXMLTranslator {

-static function copyXML (xmlobj, trimwhitespace, nsprefix) {
-    var lfcnode = copyFlashXML(xmlobj, trimwhitespace, nsprefix);
+static function copyXML (xmlobj:XML, trimwhitespace:Boolean, nsprefix:Boolean) :LzDataElementMixin {
+    var lfcnode:LzDataNodeMixin = copyFlashXML(xmlobj, trimwhitespace, nsprefix);
     if (lfcnode == null) {
         trace('LzXMLTranslator.copyXML: lfcnode.children is null', lfcnode);
     }
-    var fc = lfcnode;
-    if ( fc is LzDataText ) {
+
+    if ( lfcnode is LzDataText ) {
         return null;
     }
-    return fc;
+
+    return (lfcnode cast LzDataElementMixin);
 }

@@ -34,12 +35,12 @@
   * trim whitespace from start and end of string
   * @access private
   */
-static function trim( str ) {
-    var whitech = whitespaceChars;
-    var len = str.length;
-    var sindex = 0;
-    var eindex = str.length -1;
-    var ch;
+static function trim( str:String ) :String {
+    var whitech:Object = whitespaceChars;
+    var len:int = str.length;
+    var sindex:int = 0;
+    var eindex:int = str.length -1;
+    var ch:String;
     while (sindex < len) {
         ch = str.charAt(sindex);
         if (whitech[ch] != true) break;
@@ -63,11 +64,11 @@
   * @param boolean nsprefix: preserve namespace prefixes on node names and attribute names
   * @access private
   */
-static function copyFlashXML (node, trimwhitespace, nsprefix) {
-    var lfcnode = null;
+static function copyFlashXML (node:XML, trimwhitespace:Boolean, nsprefix:Boolean) :LzDataNodeMixin {
+    var lfcnode:LzDataNodeMixin = null;
     // text node?
     if (node.nodeKind() == 'text') {
-        var nv = node.toString();
+        var nv:String = node.toString();
         if (trimwhitespace == true) {
             nv = trim(nv);
         }
@@ -75,31 +76,48 @@
 //PBR Changed to match swf kernel
 //    } else if (node.nodeKind() == 'element') {
       } else {
-        var nattrs = node.attributes();
-        var cattrs = {};
+
+        var nattrs:XMLList = node.attributes();
+        var cattrs:Object = {};
         for (var i:int = 0; i < nattrs.length(); i++) {
-            var key = nsprefix ? nattrs[i].name() : nattrs[i].localName();
-            cattrs[key] = nattrs[i];
-        }
-
-        var nname = node.localName();
-        if (nname && !nsprefix) {
-            // strip namespace prefix
-            var npos = nname.indexOf(':');
-            if (npos >= 0) {
-                nname = nname.substring(npos+1);
+            var attr:XML = nattrs[i];
+            var qattr:QName = attr.name();
+            if (nsprefix) {
+                var ns:Namespace = attr.namespace();
+                var key:String;
+                if (ns != null && ns.prefix != "") {
+                    key = ns.prefix + ":" + qattr.localName;
+                } else {
+                    key = qattr.localName;
+                }
+                cattrs[key] = attr.toString();
+            } else {
+                cattrs[qattr.localName] = attr.toString();
             }
         }

+        var nname:String;
+        var qname:QName = node.name();
+        if (nsprefix) {
+            var ns:Namespace = node.namespace();
+            if (ns != null && ns.prefix != "") {
+                nname = ns.prefix + ":" + qname.localName;
+            } else {
+                nname = qname.localName;
+            }
+        } else {
+            nname = qname.localName;
+        }
+
         lfcnode = new LzDataElement(nname, cattrs);
-        var children = node.children();
-        var newchildren = [];
-        for (var i  = 0; i < children.length(); i++ ) {
-            var child = children[i];
-            var lfcchild = copyFlashXML(child, trimwhitespace, nsprefix);
+        var children:XMLList = node.children();
+        var newchildren:Array = [];
+        for (var i:int  = 0; i < children.length(); i++ ) {
+            var child:XML = children[i];
+            var lfcchild:LzDataNodeMixin = copyFlashXML(child, trimwhitespace, nsprefix);
             newchildren[i] = lfcchild;
         }
-        lfcnode.setChildNodes(newchildren);
+        (lfcnode cast LzDataElement).setChildNodes(newchildren);
     }
     return lfcnode;
 }


Now making two passes on grouped callbacks that get recursively triggered. The second pass allows grouped callbacks to call each other immediately.

--- WeaveCore/src/weave/core/CallbackCollection.as
+++ WeaveCore/src/weave/core/CallbackCollection.as
@@ -178,11 +178,7 @@
 						shouldRemoveEntry = WeaveAPI.SessionManager.objectWasDisposed(entry.context);
 					if (shouldRemoveEntry)
 					{
-						if (debug && entry.callback != null)
-							entry.removeCallback_stackTrace = new Error(STACK_TRACE_REMOVE).getStackTrace();
-						// help the garbage-collector a bit
-						entry.context = null;
-						entry.callback = null;
+						entry.dispose();
 						// remove the empty callback reference from the list
 						var removed:Array = _callbackEntries.splice(i--, 1); // decrease i because remaining entries have shifted
 						if (debug)
@@ -227,10 +223,7 @@
 					{
 						// Remove the callback by setting the function pointer to null.
 						// This is done instead of removing the entry because we may be looping over the _callbackEntries Array right now.
-						entry.context = null;
-						entry.callback = null;
-						if (debug)
-							entry.removeCallback_stackTrace = new Error(STACK_TRACE_REMOVE).getStackTrace();
+						entry.dispose();
 					}
 				}
 			}
@@ -393,6 +386,18 @@
 	 * This is a stack trace from when the callback was removed.
 	 */
 	public var removeCallback_stackTrace:String = null;
+
+	/**
+	 * Call this when the callback entry is no longer needed.
+	 */
+	public function dispose():void
+	{
+		if (CallbackCollection.debug && callback != null)
+			removeCallback_stackTrace = new Error(STACK_TRACE_REMOVE).getStackTrace();
+
+		context = null;
+		callback = null;
+	}
 }

 /**
@@ -432,23 +437,52 @@
 	/**
 	 * This function gets called once per frame and allows grouped callbacks to run.
 	 */
-	public static function _handleGroupedCallbacks():void
-	{
+	private static function _handleGroupedCallbacks():void
+	{
+		var i:int;
 		var entry:GroupedCallbackEntry;

-		// Handle grouped callbacks in the order they were triggered,
-		// anticipating that more may be added to the end of the list in the process.
-		for (var i:int = 0; i < _triggeredEntries.length; i++)
-		{
-			entry = _triggeredEntries[i] as GroupedCallbackEntry;
-			entry.handleGroupedCallback();
-		}
+		_handlingGroupedCallbacks = true;
+		{
+			// Handle grouped callbacks in the order they were triggered,
+			// anticipating that more may be added to the end of the list in the process.
+			// This first pass does not allow grouped callbacks to call each other immediately.
+			for (i = 0; i < _triggeredEntries.length; i++)
+			{
+				entry = _triggeredEntries[i] as GroupedCallbackEntry;
+				entry.handleGroupedCallback();
+			}
+
+			// after all grouped callbacks have been handled once, run those which were triggered recursively and allow them to call other grouped callbacks immediately.
+			_handlingRecursiveGroupedCallbacks = true;
+			{
+				// handle grouped callbacks that were triggered recursively
+				for (i = 0; i < _triggeredEntries.length; i++)
+				{
+					entry = _triggeredEntries[i] as GroupedCallbackEntry;
+					if (entry.triggeredAgain)
+						entry.handleGroupedCallback();
+				}
+			}
+			_handlingRecursiveGroupedCallbacks = false;
+		}
+		_handlingGroupedCallbacks = false;

 		// reset for next frame
 		for each (entry in _triggeredEntries)
-			entry.triggered = false;
+			entry.triggered = entry.triggeredAgain = false;
 		_triggeredEntries.length = 0;
 	}
+
+	/**
+	 * True while handling grouped callbacks.
+	 */
+	private static var _handlingGroupedCallbacks:Boolean = false;
+
+	/**
+	 * True while handling grouped callbacks called recursively from other grouped callbacks.
+	 */
+	private static var _handlingRecursiveGroupedCallbacks:Boolean = false;

 	/**
 	 * This gets set to true when the static _handleGroupedCallbacks() callback has been added as a frame listener.
@@ -486,16 +520,32 @@
 	public var triggered:Boolean = false;

 	/**
+	 * If true, the callback was triggered again from another grouped callback.
+	 */
+	public var triggeredAgain:Boolean = false;
+
+	/**
 	 * Marks the entry to be handled later (unless already triggered this frame).
 	 * This also takes care of preventing recursion.
 	 */
 	public function trigger():void
 	{
-		if (!triggered)
-		{
+		// if handling recursive callbacks, call now
+		if (_handlingRecursiveGroupedCallbacks)
+		{
+			handleGroupedCallback();
+		}
+		else if (!triggered)
+		{
+			// not previously triggered
 			_triggeredEntries.push(this);
 			triggered = true;
 		}
+		else if (_handlingGroupedCallbacks)
+		{
+			// triggered recursively - call later
+			triggeredAgain = true;
+		}
 	}

 	/**
@@ -503,6 +553,9 @@
 	 */
 	public function handleGroupedCallback():void
 	{
+		if (!context)
+			return;
+
 		// first, make sure there is at least one relevant context for this callback.
 		var allContexts:Array = context as Array;
 		// remove the contexts that have been disposed of.
@@ -512,14 +565,38 @@
 		// if there are no more relevant contexts for this callback, don't run it.
 		if (allContexts.length == 0)
 		{
-			if (CallbackCollection.debug)
-				removeCallback_stackTrace = new Error(STACK_TRACE_REMOVE).getStackTrace();
-			// clean up and remove this entry
-			callback = null; // help the garbage-collector a bit
+			dispose();
 			delete _entryLookup[callback];
 			return;
 		}

-		callback();
+		// avoid immediate recursion
+		if (recursionCount == 0)
+		{
+			recursionCount++;
+			callback();
+			recursionCount--;
+		}
+		// avoid delayed recursion
+		triggeredAgain = false;
 	}
 }
+/*
+weave.path('a').remove().request('LinkableString')
+	.addCallback(function(){
+		console.log('1');
+	})
+	.addCallback(function(){
+		var newState = this.getState() + 'x';
+		console.log(2, newState);
+		this.exec("Class('flash.debugger.enterDebugger')()");
+		this.state(newState);
+	})
+	.addCallback(function(){
+		var newState = this.getState() + 'y';
+		console.log(3, newState);
+		this.exec("Class('flash.debugger.enterDebugger')()");
+		this.state(newState);
+	})
+	.state('hello');
+*/


Added measure() method so that the component knows its size

--- frameworks/projects/mobiletheme/src/spark/skins/android4/ToggleSwitchSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/android4/ToggleSwitchSkin.as
@@ -233,6 +233,18 @@
 			drawLabel();
 		}

+		override protected function measure():void
+		{
+			// The skin must be at least as large as the thumb
+			measuredMinWidth = layoutThumbWidth;
+			measuredMinHeight = layoutThumbHeight;
+
+			// The preferred size will display all label text
+			var labelWidth:Number = getElementPreferredWidth(selectedLabelDisplay);
+			measuredWidth = layoutThumbWidth + labelWidth;
+			measuredHeight = layoutThumbHeight;
+		}
+
 		override protected function commitCurrentState():void
 		{
 			toggleSelectionState();


Transferred from the Adobe Open Source Subversion Repository

Revision: 6204
Author:   rfrishbe@adobe.com
Date:     2009-04-22T22:24:18.334273Z

Log Message:
-----------
Make the item renderer classes for FIelSystemComboBox and FileSystemDataGrid public (although still hidden from ASDoc and excluded from code-hinting) instead of internal helper classes.  This is needed for automation.

QE Notes: -
Doc Notes: -
Bugs: SDK-20703, SDK-20702
Reviewer: Deepa
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemDataGridNameColumnRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemComboBoxRenderer.as</path>

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

--- frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as
@@ -17,6 +17,7 @@

 import mx.controls.dataGridClasses.DataGridColumn;
 import mx.controls.fileSystemClasses.FileSystemControlHelper;
+import mx.controls.fileSystemClasses.FileSystemDataGridNameColumnRenderer;
 import mx.core.ClassFactory;
 import mx.core.IUITextField;
 import mx.core.ScrollPolicy;
@@ -1070,7 +1071,7 @@
         nameColumn = new CustomDataGridColumn();
         nameColumn.headerText = resourceManager.getString(
             "aircontrols", "fileSystemDataGrid_nameColumnHeader");
-        nameColumn.itemRenderer = new ClassFactory(NameColumnRenderer);
+        nameColumn.itemRenderer = new ClassFactory(FileSystemDataGridNameColumnRenderer);
         nameColumn.labelFunction = helper.fileLabelFunction;
         nameColumn.sortCompareFunction = nameSortCompareFunction;
         measuredText = resourceManager.getString(
@@ -1718,355 +1719,4 @@
     {
         return labelFunction(data);
     }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Helper class: NameColumnRenderer
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/**
- *  @private
- *  This helper class implements the renderer for the Name column,
- *  which displays an icon and a name for a File.
- *  We need a custom renderer because DataGridItemRenderer
- *  doesn't support an icon.
- */
-class NameColumnRenderer extends UIComponent
-    implements IDataRenderer, IDropInListItemRenderer, IListItemRenderer
-{
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Constructor.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function NameColumnRenderer()
-    {
-        super();
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    private var listOwner:ListBase;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden properties: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  baselinePosition
-    //----------------------------------
-
-    /**
-     *  @private
-     *  The baselinePosition of a NameColumnRenderer is calculated
-     *  for its label.
-     */
-    override public function get baselinePosition():Number
-    {
-        if (!mx_internal::validateBaselinePosition())
-            return NaN;
-
-        return label.y + label.baselinePosition;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  data
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the data property.
-     */
-    private var _data:Object;
-
-    [Bindable("dataChange")]
-
-    /**
-     *  The implementation of the data property
-     *  as defined by the IDataRenderer interface.
-     *  When set, it stores the value and invalidates the component
-     *  to trigger a relayout of the component.
-     *
-     *  @see mx.core.IDataRenderer
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function get data():Object
-    {
-        return _data;
-    }
-
-    /**
-     *  @private
-     */
-    public function set data(value:Object):void
-    {
-        _data = value;
-
-        invalidateProperties();
-
-        dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
-    }
-
-    //----------------------------------
-    //  icon
-    //----------------------------------
-
-    /**
-     *  The internal IFlexDisplayObject that displays the icon in this renderer.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    protected var icon:IFlexDisplayObject;
-
-    //----------------------------------
-    //  label
-    //----------------------------------
-
-    /**
-     *  The internal IUITextField that displays the text in this renderer.
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    protected var label:IUITextField;
-
-    //----------------------------------
-    //  listData
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the listData property.
-     */
-    private var _listData:DataGridListData;
-
-    [Bindable("dataChange")]
-
-    /**
-     *  The implementation of the listData property
-     *  as defined by the IDropInListItemRenderer interface.
-     *
-     *  @see mx.controls.listClasses.IDropInListItemRenderer
-     *
-     *  @langversion 3.0
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function get listData():BaseListData
-    {
-        return _listData;
-    }
-
-    /**
-     *  @private
-     */
-    public function set listData(value:BaseListData):void
-    {
-        _listData = DataGridListData(value);
-
-        invalidateProperties();
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden methods: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function createChildren():void
-    {
-        super.createChildren();
-
-        if (!label)
-        {
-            label = IUITextField(createInFontContext(UITextField));
-            label.styleName = this;
-            addChild(DisplayObject(label));
-        }
-    }
-
-    /**
-     *  @private
-     *  Apply the data and listData.
-     *  Create an instance of the icon if specified,
-     *  and set the text into the text field.
-     */
-    override protected function commitProperties():void
-    {
-        super.commitProperties();
-
-        if (icon)
-        {
-            removeChild(DisplayObject(icon));
-            icon = null;
-        }
-
-        if (_data != null)
-        {
-            listOwner = ListBase(_listData.owner);
-
-            if (FileSystemDataGrid(listOwner).showIcons)
-            {
-                var iconClass:Class =
-                    listOwner.getStyle(File(_data).isDirectory ?
-                                       "directoryIcon" :
-                                       "fileIcon");
-                icon = new iconClass();
-                addChild(DisplayObject(icon));
-            }
-
-            label.text = _listData.label ? _listData.label : " ";
-            label.multiline = listOwner.variableRowHeight;
-            label.wordWrap = listOwner.wordWrap;
-
-            if (listOwner.showDataTips)
-            {
-                if (label.textWidth > label.width ||
-                    listOwner.dataTipFunction != null)
-                {
-                    toolTip = listOwner.itemToDataTip(_data);
-                }
-                else
-                {
-                    toolTip = null;
-                }
-            }
-            else
-            {
-                toolTip = null;
-            }
-        }
-        else
-        {
-            label.text = " ";
-            toolTip = null;
-        }
-    }
-
-    /**
-     *  @private
-     */
-    override protected function measure():void
-    {
-        super.measure();
-
-        var w:Number = 0;
-
-        if (icon)
-            w = icon.measuredWidth;
-
-        // Guarantee that label width isn't zero
-        // because it messes up ability to measure.
-        if (label.width < 4 || label.height < 4)
-        {
-            label.width = 4;
-            label.height = 16;
-        }
-
-        if (isNaN(explicitWidth))
-        {
-            w += label.getExplicitOrMeasuredWidth();
-            measuredWidth = w;
-            measuredHeight = label.getExplicitOrMeasuredHeight();
-        }
-        else
-        {
-            measuredWidth = explicitWidth;
-            label.setActualSize(Math.max(explicitWidth - w, 4), label.height);
-            measuredHeight = label.getExplicitOrMeasuredHeight();
-            if (icon && icon.measuredHeight > measuredHeight)
-                measuredHeight = icon.measuredHeight;
-        }
-    }
-
-    /**
-     *  @private
-     */
-    override protected function updateDisplayList(unscaledWidth:Number,
-                                                  unscaledHeight:Number):void
-    {
-        super.updateDisplayList(unscaledWidth, unscaledHeight);
-
-        var startX:Number = 0;
-
-        if (icon)
-        {
-            icon.x = startX;
-            startX = icon.x + icon.measuredWidth;
-            icon.setActualSize(icon.measuredWidth, icon.measuredHeight);
-        }
-
-        label.x = startX;
-        label.setActualSize(unscaledWidth - startX, measuredHeight);
-
-        var verticalAlign:String = getStyle("verticalAlign");
-        if (verticalAlign == "top")
-        {
-            label.y = 0;
-            if (icon)
-                icon.y = 0;
-        }
-        else if (verticalAlign == "bottom")
-        {
-            label.y = unscaledHeight - label.height + 2; // 2 for gutter
-            if (icon)
-                icon.y = unscaledHeight - icon.height;
-        }
-        else
-        {
-            label.y = (unscaledHeight - label.height) / 2;
-            if (icon)
-                icon.y = (unscaledHeight - icon.height) / 2;
-        }
-
-        var labelColor:Number;
-
-        if (data && parent)
-        {
-            if (!enabled)
-                labelColor = getStyle("disabledColor");
-            else if (listOwner.isItemHighlighted(listData.uid))
-                labelColor = getStyle("textRollOverColor");
-            else if (listOwner.isItemSelected(listData.uid))
-                labelColor = getStyle("textSelectedColor");
-            else
-                labelColor = getStyle("color");
-
-            label.setColor(labelColor);
-        }
-    }
-}
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

QE Notes: None
Doc Notes: None
Bugs: -

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

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

--- frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as
+++ frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as
@@ -258,7 +258,6 @@
  *
  *  @see flash.filesystem.File
  *
- *  @playerversion AIR 1.1
  */
 public class FileSystemDataGrid extends DataGrid
 {
@@ -359,10 +358,10 @@
      *     itemClick="fileSystemViewer.navigateBack(event.index);"/>

      *
      *  @default []
-	 *
-	 *  @see #canNavigateBack
-	 *  @see #navigateBack()
-	 *  @see mx.controls.FileSystemHistoryButton
+     *
+     *  @see #canNavigateBack
+     *  @see #navigateBack()
+     *  @see mx.controls.FileSystemHistoryButton
      */
     public function get backHistory():Array
     {
@@ -392,9 +391,9 @@
      *      itemClick="fileSystemViewer.navigateBack(event.index);"/>

      *
      *  @default false
-	 *
-	 *  @see #backHistory
-	 *  @see #navigateBack()
+     *
+     *  @see #backHistory
+     *  @see #navigateBack()
      */
     public function get canNavigateBack():Boolean
     {
@@ -424,8 +423,8 @@
      *      click="fileSystemViewer.navigateDown();"/>

      *
      *  @default false
-	 *
-	 *  @see #navigateDown()
+     *
+     *  @see #navigateDown()
      */
     public function get canNavigateDown():Boolean
     {
@@ -455,9 +454,9 @@
      *      itemClick="fileSystemViewer.navigateForward(event.index);"/>

      *
      *  @default false
-	 *
-	 *  @see #forwardHistory
-	 *  @see #navigateForward()
+     *
+     *  @see #forwardHistory
+     *  @see #navigateForward()
      */
     public function get canNavigateForward():Boolean
     {
@@ -488,8 +487,8 @@
      *      click="fileSystemViewer.navigateUp();"/>

      *
      *  @default false
-	 *
-	 *  @see #navigateUp()
+     *
+     *  @see #navigateUp()
      */
     public function get canNavigateUp():Boolean
     {
@@ -523,10 +522,10 @@
     private var _dateFormatString:String;

     /**
-	 *  @private
-	 */
-	private var dateFormatStringOverride:String;
-
+     *  @private
+     */
+    private var dateFormatStringOverride:String;
+
     /**
      *  A String that determines how dates in the Created and Modified
      *  columns are formatted.
@@ -545,17 +544,17 @@
      */
     public function set dateFormatString(value:String):void
     {
-		dateFormatStringOverride = value;
-
-		_dateFormatString = value != null ?
-					   		value :
-					   		resourceManager.getString(
-								"aircontrols",
-								"fileSystemDataGrid_dateFormatString");
+        dateFormatStringOverride = value;
+
+        _dateFormatString = value != null ?
+                            value :
+                            resourceManager.getString(
+                                "aircontrols",
+                                "fileSystemDataGrid_dateFormatString");

         dateFormatter.formatString = _dateFormatString != null ?
-        							 _dateFormatString :
-        							 "";
+                                     _dateFormatString :
+                                     "";

         invalidateList();
     }
@@ -681,8 +680,8 @@
      *      itemClick="fileSystemViewer.navigateForward(event.index);"/>

      *
      *  @default []
-	 *
-	 * @see mx.controls.FileSystemHistoryButton
+     *
+     * @see mx.controls.FileSystemHistoryButton
      */
     public function get forwardHistory():Array
     {
@@ -749,7 +748,7 @@

     [Bindable("change")]
     [Bindable("directoryChanged")]
-
+
     /**
      *  @copy mx.controls.FileSystemList#selectedPath
      *
@@ -942,47 +941,47 @@

         nameColumn = new CustomDataGridColumn();
         nameColumn.headerText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_nameColumnHeader");
+            "aircontrols", "fileSystemDataGrid_nameColumnHeader");
         nameColumn.itemRenderer = new ClassFactory(NameColumnRenderer);
         nameColumn.labelFunction = helper.fileLabelFunction;
         nameColumn.sortCompareFunction = nameSortCompareFunction;
         measuredText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_nameColumnMeasuredText");
+            "aircontrols", "fileSystemDataGrid_nameColumnMeasuredText");
         nameColumn.width = determineWidthToDisplay(measuredText);

         typeColumn = new CustomDataGridColumn();
         typeColumn.headerText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_typeColumnHeader");
+            "aircontrols", "fileSystemDataGrid_typeColumnHeader");
         typeColumn.labelFunction = typeLabelFunction;
         typeColumn.sortCompareFunction = typeSortCompareFunction;
         measuredText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_typeColumnMeasuredText");
+            "aircontrols", "fileSystemDataGrid_typeColumnMeasuredText");
         typeColumn.width = determineWidthToDisplay(measuredText);

         sizeColumn = new CustomDataGridColumn();
         sizeColumn.headerText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_sizeColumnHeader");
+            "aircontrols", "fileSystemDataGrid_sizeColumnHeader");
         sizeColumn.labelFunction = sizeLabelFunction;
         sizeColumn.public::setStyle("textAlign", "right");
         sizeColumn.sortCompareFunction = sizeSortCompareFunction;
         measuredText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_sizeColumnMeasuredText");
+            "aircontrols", "fileSystemDataGrid_sizeColumnMeasuredText");
         sizeColumn.width = determineWidthToDisplay(measuredText);

         creationDateColumn = new CustomDataGridColumn();
         creationDateColumn.headerText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_creationDateColumnHeader");
+            "aircontrols", "fileSystemDataGrid_creationDateColumnHeader");
         creationDateColumn.labelFunction = creationDateLabelFunction;
         measuredText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_creationDateColumnMeasuredText");
+            "aircontrols", "fileSystemDataGrid_creationDateColumnMeasuredText");
         creationDateColumn.width = determineWidthToDisplay(measuredText);

         modificationDateColumn = new CustomDataGridColumn();
         modificationDateColumn.headerText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_modificationDateColumnHeader");
+            "aircontrols", "fileSystemDataGrid_modificationDateColumnHeader");
         modificationDateColumn.labelFunction = modificationDateLabelFunction;
         measuredText = resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_modificationDateColumnMeasuredText");
+            "aircontrols", "fileSystemDataGrid_modificationDateColumnMeasuredText");
         modificationDateColumn.width = determineWidthToDisplay(measuredText);

         // If DataGridColumns haven't already been defined,
@@ -1037,53 +1036,53 @@

         if (nameColumn)
         {
- 	        nameColumn.headerText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_nameColumnHeader");
-	        measuredText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_nameColumnMeasuredText");
-	        nameColumn.width = determineWidthToDisplay(measuredText);
+            nameColumn.headerText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_nameColumnHeader");
+            measuredText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_nameColumnMeasuredText");
+            nameColumn.width = determineWidthToDisplay(measuredText);
         }

         if (typeColumn)
         {
-	        typeColumn.headerText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_typeColumnHeader");
-	        measuredText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_typeColumnMeasuredText");
-	        typeColumn.width = determineWidthToDisplay(measuredText);
+            typeColumn.headerText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_typeColumnHeader");
+            measuredText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_typeColumnMeasuredText");
+            typeColumn.width = determineWidthToDisplay(measuredText);
         }

         if (sizeColumn)
         {
-	        sizeColumn.headerText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_sizeColumnHeader");
-	        measuredText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_sizeColumnMeasuredText");
-	        sizeColumn.width = determineWidthToDisplay(measuredText);
+            sizeColumn.headerText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_sizeColumnHeader");
+            measuredText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_sizeColumnMeasuredText");
+            sizeColumn.width = determineWidthToDisplay(measuredText);
         }

         if (creationDateColumn)
         {
-	        creationDateColumn.headerText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_creationDateColumnHeader");
-	        measuredText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_creationDateColumnMeasuredText");
-	        creationDateColumn.width = determineWidthToDisplay(measuredText);
+            creationDateColumn.headerText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_creationDateColumnHeader");
+            measuredText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_creationDateColumnMeasuredText");
+            creationDateColumn.width = determineWidthToDisplay(measuredText);
         }

         if (modificationDateColumn)
         {
-	        modificationDateColumn.headerText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_modificationDateColumnHeader");
-	        measuredText = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_modificationDateColumnMeasuredText");
-	        modificationDateColumn.width = determineWidthToDisplay(measuredText);
-        }
-
-		dateFormatString = dateFormatStringOverride;
-
-		invalidateList();
-		invalidateSize();
+            modificationDateColumn.headerText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_modificationDateColumnHeader");
+            measuredText = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_modificationDateColumnMeasuredText");
+            modificationDateColumn.width = determineWidthToDisplay(measuredText);
+        }
+
+        dateFormatString = dateFormatStringOverride;
+
+        invalidateList();
+        invalidateSize();
     }

     /**
@@ -1091,7 +1090,7 @@
      */
     override protected function itemToUID(data:Object):String
     {
-    	return helper.itemToUID(data);
+        return helper.itemToUID(data);
     }

     //--------------------------------------------------------------------------
@@ -1138,8 +1137,8 @@
      *  <mx:Button label="Open"
      *      enabled="{fileSystemViewer.canNavigateDown}"
      *      click="fileSystemViewer.navigateDown();"/>

-	 *
-	 *  @see #canNavigateDown
+     *
+     *  @see #canNavigateDown
      */
     public function navigateDown():void
     {
@@ -1169,8 +1168,8 @@
      *  <mx:Button label="Up"
      *      enabled="{fileSystemViewer.canNavigateUp}"
      *      click="fileSystemViewer.navigateUp();"/>

-	 *
-	 *  @see #canNavigateUp
+     *
+     *  @see #canNavigateUp
      */
     public function navigateUp():void
     {
@@ -1211,9 +1210,9 @@
      *  @param index The index in the backHistory array
      *  to navigate to.
      *  The default is 0, indicating the directory that is "closest back".
-	 *
-	 *  @see #backHistory
-	 *  @see #canNavigateBack
+     *
+     *  @see #backHistory
+     *  @see #canNavigateBack
      */
     public function navigateBack(index:int = 0):void
     {
@@ -1254,9 +1253,9 @@
      *  @param index The index in the forwardHistory array
      *  to navigate to.
      *  The default is 0, indicating the directory that is "closest forward".
-	 *
-	 *  @see #canNavigateForward
-	 *  @see #forwardHistory
+     *
+     *  @see #canNavigateForward
+     *  @see #forwardHistory
      */
     public function navigateForward(index:int = 0):void
     {
@@ -1313,7 +1312,7 @@
         if (item.isDirectory)
         {
             return resourceManager.getString(
-            	"aircontrols", "fileSystemDataGrid_typeFolder");
+                "aircontrols", "fileSystemDataGrid_typeFolder");
         }

         // If item is a file without an extension, return "File".
@@ -1321,13 +1320,13 @@
         if (!extension || extension == "")
         {
             return resourceManager.getString(
-            	"aircontrols", "fileSystemDataGrid_typeFileWithoutExtension");
+                "aircontrols", "fileSystemDataGrid_typeFileWithoutExtension");
         }

         // If item is a file with an extension, return a String like "TXT File".
         return resourceManager.getString(
-        	"aircontrols", "fileSystemDataGrid_typeFileWithExtension",
-        	[ extension.toUpperCase() ]);
+            "aircontrols", "fileSystemDataGrid_typeFileWithExtension",
+            [ extension.toUpperCase() ]);
     }

     /**
@@ -1358,32 +1357,32 @@

         try
         {
-	        if (item.isDirectory)
-	        {
-	            label = resourceManager.getString(
-	            	"aircontrols", "fileSystemDataGrid_sizeFolder");
-	        }
-	        else if (sizeDisplayMode == FileSystemSizeDisplayMode.KILOBYTES)
-	        {
-	            var kb:int = Math.ceil(item.size / 1024);
-	            label = resourceManager.getString(
-	            	"aircontrols", "fileSystemDataGrid_sizeKilobytes",
-					[ kb ]);
-	        }
-	        else if (sizeDisplayMode == FileSystemSizeDisplayMode.BYTES)
-	        {
-	            label = resourceManager.getString(
-	            	"aircontrols", "fileSystemDataGrid_sizeBytes",
-					[ item.size ]);
-	        }
+            if (item.isDirectory)
+            {
+                label = resourceManager.getString(
+                    "aircontrols", "fileSystemDataGrid_sizeFolder");
+            }
+            else if (sizeDisplayMode == FileSystemSizeDisplayMode.KILOBYTES)
+            {
+                var kb:int = Math.ceil(item.size / 1024);
+                label = resourceManager.getString(
+                    "aircontrols", "fileSystemDataGrid_sizeKilobytes",
+                    [ kb ]);
+            }
+            else if (sizeDisplayMode == FileSystemSizeDisplayMode.BYTES)
+            {
+                label = resourceManager.getString(
+                    "aircontrols", "fileSystemDataGrid_sizeBytes",
+                    [ item.size ]);
+            }
         }
         catch(e:Error)
         {
-        	// item.size throws a File I/O Error for some files,
-        	// such as /etc/master.passwd and /etc/sudoers on a Mac
-
-	        label = resourceManager.getString(
-	        	"aircontrols", "fileSystemDataGrid_sizeFolder");
+            // item.size throws a File I/O Error for some files,
+            // such as /etc/master.passwd and /etc/sudoers on a Mac
+
+            label = resourceManager.getString(
+                "aircontrols", "fileSystemDataGrid_sizeFolder");
         }

         return label;
@@ -1397,24 +1396,24 @@
         var size1:Number;
         try
         {
-        	size1 = item1.isDirectory ? 0 : item1.size;
+            size1 = item1.isDirectory ? 0 : item1.size;
         }
         catch(e1:Error)
         {
-        	// item.size throws a File I/O Error for some files,
-        	// such as /etc/master.passwd and /etc/sudoers on a Mac
-
-        	size1 = 0;
+            // item.size throws a File I/O Error for some files,
+            // such as /etc/master.passwd and /etc/sudoers on a Mac
+
+            size1 = 0;
         }

         var size2:Number;
         try
         {
-        	size2 = item2.isDirectory ? 0 : item2.size;
+            size2 = item2.isDirectory ? 0 : item2.size;
         }
         catch(e2:Error)
         {
-        	size2 = 0;
+            size2 = 0;
         }

         if (size1 < size2)
@@ -1606,14 +1605,14 @@

     /**
      *  @private
-	 *  The baselinePosition of a NameColumnRenderer is calculated
-	 *  for its label.
+     *  The baselinePosition of a NameColumnRenderer is calculated
+     *  for its label.
      */
     override public function get baselinePosition():Number
     {
-		if (!mx_internal::validateBaselinePosition())
-			return NaN;
-
+        if (!mx_internal::validateBaselinePosition())
+            return NaN;
+
         return label.y + label.baselinePosition;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12764
Author:   gosmith@adobe.com
Date:     2009-12-10T02:06:04.655479Z

Log Message:
-----------
Dealt with issues involving accessibility and skin parts.

1. The accessibility implementation classes for four Spark components -- ComboBox, NumericStepper, TitleWindow, and VideoPlayer -- need to listen to events dispatched from skin parts. The problems were:

a) Skin parts may not exist at the time that the acc impl constructor executes, which is when we were doing addEventListener() on them. This is now fixed by consistently having null checks.

b) Skin parts may come and go at any later time. We now cope with this by having the acc impls listen for "partAdded" and "partRemoved" events from the component. When they discover that a skin part they want to listen to is being added, they now call addEventListener(), and when a skin part is removed they call removeEventListener().

2. The accessibility implementation classes for two Spark components -- Panel and TitleWindow -- actually get attached to a skin part (the titleDisplay) rather than to the component. Since we do this in createAccessibilityImplementation(), it's a problem if this happens before the titleDisplay exists. So instead of calling createAccessibilityImplementation() from initializeAccessibiility(), these components now call it from partAdded(). They also remove the acc impl if the titleDisplay is removed. Finally, there is some logic to prevent the partAdded() method of TitleWindow, which is a subclass of Panel, from creating both a PanelAccImpl and a TitleWindowAccImpl.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SpinnerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/VideoPlayerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/NumericStepperAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>

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

--- frameworks/projects/spark/src/spark/accessibility/SliderBaseAccImpl.as
+++ frameworks/projects/spark/src/spark/accessibility/SliderBaseAccImpl.as
@@ -273,15 +273,22 @@
         }
     }

-    /**
-     *  @private
-     *  This is (kind of) a hack to get around the fact that SliderBase is not
-     *  an IFocusManagerComponent. It forces frocus from accessibility when one of
-     *  its thumbs get focus.
+	//--------------------------------------------------------------------------
+	//
+	//  Event handlers
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+     *  @private
+     *  This is (kind of) a hack to get around the fact
+	 *  that SliderBase is not an IFocusManagerComponent.
+	 *  It forces focus from accessibility when one of its thumbs get focus.
      */
     private function focusInHandler(event:Event):void
     {
         Accessibility.sendEvent(master, 0, AccConst.EVENT_OBJECT_FOCUS);
     }
 }
+
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 15643
Author:   chaase@adobe.com
Date:     2010-04-21T22:58:05.114793Z

Log Message:
-----------
Fix for shader-transition effects. Previously, if the local bounds of an object shifted position between states (this can happen with a Group, for example, if its children exceeded its bounds in different ways in the states. In the bug's example, a VScrollBar caused the group to go negative in y, an HScrollBar caused it to go negative in x), then the from/to bitmaps would be mis-matched and you'd get a jumping artifact at the beginning of the effect.

The fix was to get both the bitmap snapshot *and* the bounds of the object captured from BitmapUtil.getSnapshot(). Then use those bounds to constrain the bitmapFrom object to the bitmapTo bounds.

QE notes: There are 25 Mustella failures from this change. Some are due to a change in the return value from getAffectedProperties (I changed "bitmap" to "bitmapInfo"). Some are due to a fix to avoid clipping the results of the shader to the size of bitmapFrom (it now uses the max of the two bitmaps). So Mustella needs some fixing and some bitmap updating.
Doc notes: Added parameter to BitmapUtil.getSnapshot() and added a @param doc tag to go along with it.
Bugs: sdk-25035
Reviewer: Jason
Tests run: checkintests, Mustella spark/effects/AnimateShaderTransition|CrossFade|Wipe
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/BitmapUtil.as</path>

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

--- frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
@@ -11,6 +11,7 @@
 package spark.effects
 {
 import flash.display.BitmapData;
+import flash.geom.Rectangle;
 import flash.utils.ByteArray;

 import mx.core.IUIComponent;
@@ -254,7 +255,9 @@
         // We track visible and parent so that we can automatically
         // perform transitions from/to states where the target either
         // does not exist or is not visible
-        return ["bitmap", "visible", "parent"];
+        // Note that 'bitmapInfo' is an Object map containing both a bitmap
+        // and the visual bounds of that bitmap on the screen
+        return ["bitmapInfo", "visible", "parent"];
     }

     /**
@@ -262,7 +265,7 @@
      */
     override protected function getValueFromTarget(target:Object, property:String):*
     {
-        if (property != "bitmap")
+        if (property != "bitmapInfo")
             return super.getValueFromTarget(target, property);

         // Return a null bitmap for non-visible targets
@@ -273,23 +276,39 @@
             throw new Error(resourceManager.getString("sparkEffects", "cannotOperateOn"));
         var bmData:BitmapData;
         var tempFilters:Array = target.filters;
+        var bounds:Rectangle;
         target.filters = [];

         try
         {
             if (target is GraphicElement)
+            {
                 bmData = GraphicElement(target).captureBitmapData(true, 0, false);
+                // The GraphicElement version does not calculate the visual bounds,
+                // so just create dummy bounds with the correct width/height
+                bounds = new Rectangle(0, 0, bmData.width, bmData.height);
+            }
             else
-                bmData = BitmapUtil.getSnapshot(IUIComponent(target));
+            {
+                // Passing in a non-null bounds parameter forces getSnapshot()
+                // to return the visual bounds of the object
+                bounds = new Rectangle();
+                bmData = BitmapUtil.getSnapshot(IUIComponent(target), bounds);
+            }
         }
         catch (e:SecurityError)
         {
             // Do nothing and let it return null.
         }
+        // The effect instance will retrieve the bitmap and bounds from the object
+        // stored here
+        var bmHolder:Object = new Object();
+        bmHolder["bitmap"] = bmData;
+        bmHolder["bounds"] = bounds;

         target.filters = tempFilters;

-        return bmData;
+        return bmHolder;
     }

     /**


typo fix

typo fix

--- src/src/com/backendless/service/_CustomService.as
+++ src/src/com/backendless/service/_CustomService.as
@@ -15,7 +15,7 @@
 public class _CustomService
 {
     private static const CUSTOM_SERVICE_ALIAS:String = "com.backendless.services.servercode.CustomServiceHandler";
-    private static const METHOD_NAME_ALIAS:String = "dispatchService"
+    private static const METHOD_NAME_ALIAS:String = "dispatchService";

     public function _CustomService()
     {


post load started and load failed events

--- src/AIR/ChildBrowser/src/blackberry/polarmobile/childbrowser/ChildBrowser.as
+++ src/AIR/ChildBrowser/src/blackberry/polarmobile/childbrowser/ChildBrowser.as
@@ -144,7 +144,25 @@
           jsOnExit = onExit;

           childWebView.addEventListener(WebViewEvent.DOCUMENT_LOADED, documentLoaded);
+          childWebView.addEventListener(WebViewEvent.DOCUMENT_LOAD_COMMITTED, documentLoadCommitted);
+          childWebView.addEventListener(WebViewEvent.DOCUMENT_LOAD_FAILED, documentLoadFailed);
           return result.jsonObject;
+        }
+
+        private function documentLoadFailed(e:WebViewEvent):void{
+         evalJavaScriptEvent(jsOnURLChange, [{
+            "code" : 101,
+            "description" :"URL Load Failed",
+            "data": childWebView.location
+          }]);
+        }
+
+        private function documentLoadCommitted(e:WebViewEvent):void{
+         evalJavaScriptEvent(jsOnURLChange, [{
+            "code" : 101,
+            "description" :"URL Load Committed",
+            "data": childWebView.location
+          }]);
         }

         private function documentLoaded(e:WebViewEvent):void{


null and type checks

null and type checks

--- src/com/phylake/fsm/impl/Fsm.as
+++ src/com/phylake/fsm/impl/Fsm.as
@@ -53,7 +53,7 @@
         public function reset():void
         {
             mapSubmachines(function(value:Object):void {
-                if ("reset" in value)
+                if ("reset" in value && value.reset is Function)
                 {
                     value.reset();
                 }
@@ -97,7 +97,7 @@

         public function mapEvent(event:String, it:ITransition):void
         {
-            _eventMap[event] ||= [];
+            _eventMap[event] || (_eventMap[event] = []);
             _eventMap[event].push(it);

             /* TODO
@@ -120,7 +120,7 @@
             if (!_states) return;
             for each (var state:IState in _states)
             {
-                if (!state.subMachines) continue;
+                if (!(state && state.subMachines)) continue;
                 for each (var submachine:IFsm in state.subMachines)
                 {
                     f(submachine);


Tone down verbose logging.

Tone down verbose logging.

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

--- src/as/com/threerings/presents/util/SafeObjectManager.as
+++ src/as/com/threerings/presents/util/SafeObjectManager.as
@@ -38,17 +38,16 @@
     /**
      * Creates a new manager. The optional available and failed parameters are callbacks
      * that must match the Subscriber interface methods.
+     *
      * @param omgr the underlying object manager to use for requesting objects
      * @param log sink for warnings and info messages
      * @param available optional callback for when an object becomes available
      * @param failed optional callback for when a subscription request fails
+     *
      * @see Subscriber
      */
     public function SafeObjectManager (
-        omgr :DObjectManager,
-        log :Log,
-        available :Function = null,
-        failed :Function = null)
+        omgr :DObjectManager, log :Log, available :Function = null, failed :Function = null)
     {
         _omgr = omgr;
         _log = log;
@@ -70,9 +69,7 @@
      * @param failed an optional callback to be invoked if the request fails
      */
     public function subscribe (
-        oid :int,
-        available :Function=null,
-        failed :Function=null) :void
+        oid :int, available :Function=null, failed :Function=null) :void
     {
         if (_entries[oid] != null ) {
             _log.warning("Object " + oid + " already subscribed");
@@ -84,7 +81,7 @@
         entry.availableFn = available;
         entry.failedFn = failed;
         sub.subscribe(_omgr);
-        _log.info("Subscribing to " + sub);
+        // _log.info("Subscribing to " + sub);
         _entries[oid] = entry;
     }

@@ -101,7 +98,7 @@
             return;
         }

-        _log.info("Unsubscribing from " + entry.sub);
+        // _log.info("Unsubscribing from " + entry.sub);
         if (entry.obj != null) {
             entry.obj.removeListener(_objectDeathListenerAdapter);
         }
@@ -118,7 +115,7 @@
      */
     public function unsubscribeAll () :void
     {
-        _log.info("Unsubscribing all objects");
+        // _log.info("Unsubscribing all objects");

         // get the keys (integer ids of subscribed objects)
         var ids :Array = new Array();
@@ -156,7 +153,7 @@
             _log.warning("Object " + obj.getOid() + " available without request?!");

         } else {
-            _log.info("Object " + obj.getOid() + " now available");
+            // _log.info("Object " + obj.getOid() + " now available");
             entry.obj = obj;
         }

@@ -208,22 +205,19 @@
             entry.obj = null;
         }

-        _log.info("Object " + oid + " destroyed");
+        // _log.info("Object " + oid + " destroyed");
     }

     protected var _omgr :DObjectManager;
     protected var _log :Log;
     protected var _available :Function;
     protected var _failed :Function;
-    protected var _adapter :SubscriberAdapter =
-        new SubscriberAdapter(available, failed);
+    protected var _adapter :SubscriberAdapter = new SubscriberAdapter(available, failed);
     protected var _objectDeathListenerAdapter :ObjectDeathListenerAdapter =
         new ObjectDeathListenerAdapter(destroyed);
     protected var _entries :Dictionary = new Dictionary();
 }
-
-}
-
+}

 import com.threerings.presents.dobj.DObject;
 import com.threerings.presents.dobj.ObjectDeathListener;


Transferred from the Adobe Open Source Subversion Repository

Revision: 13046
Author:   hneelu@adobe.com
Date:     2009-12-17T12:34:07.695337Z

Log Message:
-----------
Updating automation sources..

Modified Paths:
--------------
451 paths were modified

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

--- frameworks/projects/automation_spark/src/AutomationSparkClasses.as
+++ frameworks/projects/automation_spark/src/AutomationSparkClasses.as
@@ -27,6 +27,7 @@
 		import spark.automation.delegates.components.SparkButtonBarButtonAutomationImpl;SparkButtonBarButtonAutomationImpl;
 		import spark.automation.delegates.components.SparkCheckBoxAutomationImpl;SparkCheckBoxAutomationImpl;
 		import spark.automation.delegates.components.SparkComboBoxAutomationImpl;SparkComboBoxAutomationImpl;
+		import spark.automation.delegates.components.SparkDataGroupAutomationImpl;SparkDataGroupAutomationImpl;
 		import spark.automation.delegates.components.SparkDropDownListAutomationImpl;SparkDropDownListAutomationImpl;
 		import spark.automation.delegates.components.SparkGroupAutomationImpl;SparkGroupAutomationImpl;
 		import spark.automation.delegates.components.SparkLabelAutomationImpl;SparkLabelAutomationImpl;
@@ -38,8 +39,8 @@
 		import spark.automation.delegates.components.SparkSkinnableContainerAutomationImpl;SparkSkinnableContainerAutomationImpl;
 		import spark.automation.delegates.components.SparkSpinnerAutomationImpl;SparkSpinnerAutomationImpl;
 		import spark.automation.delegates.components.SparkTabBarAutomationImpl;SparkTabBarAutomationImpl;
-		import spark.automation.delegates.components.SprakTextAreaAutomationImpl;SprakTextAreaAutomationImpl;
-		import spark.automation.delegates.components.SprakTextInputAutomationImpl;SprakTextInputAutomationImpl;
+		import spark.automation.delegates.components.SparkTextAreaAutomationImpl;SparkTextAreaAutomationImpl;
+		import spark.automation.delegates.components.SparkTextInputAutomationImpl;SparkTextInputAutomationImpl;
 		import spark.automation.delegates.components.SparkTileGroupAutomationImpl;SparkTileGroupAutomationImpl;
 		import spark.automation.delegates.components.SparkTitleWindowAutomationImpl;SparkTitleWindowAutomationImpl;
 		import spark.automation.delegates.components.SparkVideoPlayerAutomationImpl;SparkVideoPlayerAutomationImpl;
@@ -58,9 +59,10 @@
 		import spark.automation.delegates.components.supportClasses.SparkSkinnableComponentAutomationImpl;SparkSkinnableComponentAutomationImpl;
 		import spark.automation.delegates.components.supportClasses.SparkSliderBaseAutomationImpl;SparkSliderBaseAutomationImpl;
 		import spark.automation.delegates.components.supportClasses.SparkToggleButtonBaseAutomationImpl;SparkToggleButtonBaseAutomationImpl;
-		import spark.automation.delegates.components.supportClasses.SprakSkinnableTextBaseAutomationImpl;SprakSkinnableTextBaseAutomationImpl;
+		import spark.automation.delegates.components.supportClasses.SparkSkinnableTextBaseAutomationImpl;SparkSkinnableTextBaseAutomationImpl;

 		import spark.automation.delegates.components.SparkRichEditableTextAutomationImpl;SparkRichEditableTextAutomationImpl;
+		import spark.automation.delegates.skins.spark.SparkDefaultComplexItemRendererAutomationImpl;SparkDefaultComplexItemRendererAutomationImpl;
 		import spark.automation.delegates.skins.spark.SparkDefaultItemRendererAutomationImpl;SparkDefaultItemRendererAutomationImpl;
 		import spark.automation.tabularData.SkinnableContainerTabularData;SkinnableContainerTabularData;


Transferred from the Adobe Open Source Subversion Repository

Revision: 2800
Author:   jimurphy@adobe.com
Date:     2008-08-11T16:49:08.694923Z

Log Message:
-----------
integrate:
Vellum build 147
player build 571

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/player/win/Install Flash Player 10 Plugin.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/lnx/flashplayer.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/text_importExport.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/lnx/install_flash_player_10_linux.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/win/Install Flash Player 10 ActiveX.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/text_model.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/lnx/libflashplayer.so.tar.gz</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/win/FlashPlayer.exe</path>
<path kind="file" action="M">/flex/sdk/trunk/in/player/mac/Flash Player.app.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/player/10/playerglobal.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/text_edit.swc</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -42,18 +42,18 @@
 import text.edit.StyleChangeOperation;
 import text.importExport.TextFilter;
 import text.model.BlockProgression;
-import text.model.CharacterAttributes;
-import text.model.ContainerAttributes;
+import text.model.CharacterFormat;
+import text.model.ContainerFormat;
 import text.model.Direction;
 import text.model.FlowElement;
-import text.model.ICharacterAttributes;
-import text.model.IContainerAttributes;
-import text.model.IParagraphAttributes;
+import text.model.ICharacterFormat;
+import text.model.IContainerFormat;
+import text.model.IParagraphFormat;
 import text.model.LeafElement;
 import text.model.LineBreak;
 import text.model.ModelChangeEvent;
 import text.model.Paragraph;
-import text.model.ParagraphAttributes;
+import text.model.ParagraphFormat;
 import text.model.Span;
 import text.model.TextAlign;
 import text.model.TextDecoration;
@@ -157,7 +157,7 @@

     //--------------------------------------------------------------------------
     //
-    //  Properties: Text Attributes
+    //  Properties: Text formatting
     //
     //--------------------------------------------------------------------------

@@ -1554,12 +1554,12 @@
             else if (content is Array)
             {
                 textFlow = createEmptyTextFlow();
-                textFlow.appendChildren = content as Array;
+                textFlow.mxmlChildren = content as Array;
             }
             else if (content is FlowElement)
             {
                 textFlow = createEmptyTextFlow();
-                textFlow.appendChildren = [ content ];
+                textFlow.mxmlChildren = [ content ];
             }
 			else if (content is String)
 			{
@@ -1589,66 +1589,66 @@
 		contentChanged = false;
 		textChanged = false;

-        var containerAttributes:IContainerAttributes =
-            textFlow.containerAttributes;
-        var paragraphAttributes:IParagraphAttributes =
-            textFlow.paragraphAttributes;
-        var characterAttributes:ICharacterAttributes =
-            textFlow.characterAttributes;
-
-        if (!containerAttributes || containerAttributes.blockProgression == null)
+        var containerFormat:IContainerFormat =
+            textFlow.containerFormat;
+        var paragraphFormat:IParagraphFormat =
+            textFlow.paragraphFormat;
+        var characterFormat:ICharacterFormat =
+            textFlow.characterFormat;
+
+        if (!containerFormat || containerFormat.blockProgression == null)
             textFlow.blockProgression = blockProgression;
-        if (!characterAttributes || characterAttributes.color == null)
+        if (!characterFormat || characterFormat.color == null)
             textFlow.color = color;
-        if (!paragraphAttributes || paragraphAttributes.direction == null)
+        if (!paragraphFormat || paragraphFormat.direction == null)
             textFlow.direction = direction;
-		if (!characterAttributes || characterAttributes.fontFamily == null)
+		if (!characterFormat || characterFormat.fontFamily == null)
             textFlow.fontFamily = fontFamily;
-		if (!characterAttributes || characterAttributes.fontSize == null)
+		if (!characterFormat || characterFormat.fontSize == null)
             textFlow.fontSize = fontSize;
-		if (!characterAttributes || characterAttributes.fontStyle == null)
+		if (!characterFormat || characterFormat.fontStyle == null)
 		    textFlow.fontStyle = fontStyle;
-		if (!characterAttributes || characterAttributes.fontWeight == null)
+		if (!characterFormat || characterFormat.fontWeight == null)
 		    textFlow.fontWeight = fontWeight;
-		if (!characterAttributes || characterAttributes.kerning == null)
+		if (!characterFormat || characterFormat.kerning == null)
 		    textFlow.kerning = kerning;
-		if (!characterAttributes || characterAttributes.lineHeight == null)
+		if (!characterFormat || characterFormat.lineHeight == null)
 		    textFlow.lineHeight = lineHeight;
-		if (!containerAttributes || containerAttributes.lineBreak == null)
+		if (!containerFormat || containerFormat.lineBreak == null)
 		    textFlow.lineBreak = lineBreak;
-		if (!characterAttributes || characterAttributes.lineThrough == null)
+		if (!characterFormat || characterFormat.lineThrough == null)
 		    textFlow.lineThrough = lineThrough;
-        if (!paragraphAttributes || paragraphAttributes.marginBottom == null)
+        if (!paragraphFormat || paragraphFormat.marginBottom == null)
 		    textFlow.marginBottom = marginBottom;
-        if (!paragraphAttributes || paragraphAttributes.marginLeft == null)
+        if (!paragraphFormat || paragraphFormat.marginLeft == null)
 		    textFlow.marginLeft = marginLeft;
-        if (!paragraphAttributes || paragraphAttributes.marginRight == null)
+        if (!paragraphFormat || paragraphFormat.marginRight == null)
 		    textFlow.marginRight = marginRight;
-        if (!paragraphAttributes || paragraphAttributes.marginTop == null)
+        if (!paragraphFormat || paragraphFormat.marginTop == null)
 		    textFlow.marginTop = marginTop;
-        if (!containerAttributes || containerAttributes.paddingBottom == null)
+        if (!containerFormat || containerFormat.paddingBottom == null)
 		    textFlow.paddingBottom = paddingBottom;
-        if (!containerAttributes || containerAttributes.paddingLeft == null)
+        if (!containerFormat || containerFormat.paddingLeft == null)
 		    textFlow.paddingLeft = paddingLeft;
-        if (!containerAttributes || containerAttributes.paddingRight == null)
+        if (!containerFormat || containerFormat.paddingRight == null)
 		    textFlow.paddingRight = paddingRight;
-        if (!containerAttributes || containerAttributes.paddingTop == null)
+        if (!containerFormat || containerFormat.paddingTop == null)
 		    textFlow.paddingTop = paddingTop;
-        if (!paragraphAttributes || paragraphAttributes.textAlign == null)
+        if (!paragraphFormat || paragraphFormat.textAlign == null)
 		    textFlow.textAlign = textAlign;
-        if (!paragraphAttributes || paragraphAttributes.textAlignLast == null)
+        if (!paragraphFormat || paragraphFormat.textAlignLast == null)
 		    textFlow.textAlignLast = textAlignLast;
-		if (!characterAttributes || characterAttributes.textAlpha == null)
+		if (!characterFormat || characterFormat.textAlpha == null)
 		    textFlow.textAlpha = textAlpha;
-		if (!characterAttributes || characterAttributes.textDecoration == null)
+		if (!characterFormat || characterFormat.textDecoration == null)
 		    textFlow.textDecoration = textDecoration;
-        if (!paragraphAttributes || paragraphAttributes.textIndent == null)
+        if (!paragraphFormat || paragraphFormat.textIndent == null)
 		    textFlow.textIndent = textIndent;
-		if (!characterAttributes || characterAttributes.trackingRight == null)
+		if (!characterFormat || characterFormat.trackingRight == null)
 		    textFlow.trackingRight = tracking; // what about trackingLeft?
-        if (!containerAttributes || containerAttributes.verticalAlign == null)
+        if (!containerFormat || containerFormat.verticalAlign == null)
 		    textFlow.verticalAlign = verticalAlign;
-		if (!characterAttributes || characterAttributes.whitespaceCollapse == null)
+		if (!characterFormat || characterFormat.whitespaceCollapse == null)
 		    textFlow.whitespaceCollapse = whiteSpaceCollapse; // different case

 		return textFlow;
@@ -1740,70 +1740,70 @@
         var p:String;
         var kind:String;

-        var needContainerAttributes:Boolean = false;
-        var needParagraphAttributes:Boolean = false;
-        var needCharacterAttributes:Boolean = false;
+        var needContainerFormat:Boolean = false;
+        var needParagraphFormat:Boolean = false;
+        var needCharacterFormat:Boolean = false;

         if (!names)
         {
-            names = TextUtil.ALL_ATTRIBUTE_NAMES;
+            names = TextUtil.ALL_FORMAT_NAMES;

-            needContainerAttributes = true;
-            needParagraphAttributes = true;
-            needCharacterAttributes = true;
+            needContainerFormat = true;
+            needParagraphFormat = true;
+            needCharacterFormat = true;
         }
         else
         {
             for each (p in names)
             {
-                kind = TextUtil.ATTRIBUTE_MAP[p];
+                kind = TextUtil.FORMAT_MAP[p];

                 if (kind == TextUtil.CONTAINER)
-                    needContainerAttributes = true;
+                    needContainerFormat = true;
                 else if (kind == TextUtil.PARAGRAPH)
-                    needParagraphAttributes = true;
+                    needParagraphFormat = true;
                 else if (kind == TextUtil.CHARACTER)
-                    needCharacterAttributes = true;
+                    needCharacterFormat = true;
             }
         }

-        var containerAttributes:IContainerAttributes;
-        var paragraphAttributes:IParagraphAttributes;
-        var characterAttributes:ICharacterAttributes;
-
-        if (needContainerAttributes)
+        var containerFormat:IContainerFormat;
+        var paragraphFormat:IParagraphFormat;
+        var characterFormat:ICharacterFormat;
+
+        if (needContainerFormat)
         {
-            containerAttributes =
-                selectionManager.getCommonContainerAttributes();
+            containerFormat =
+                selectionManager.getCommonContainerFormat();
         }

-        if (needParagraphAttributes)
+        if (needParagraphFormat)
         {
-            paragraphAttributes =
-                selectionManager.getCommonParagraphAttributes();
+            paragraphFormat =
+                selectionManager.getCommonParagraphFormat();
         }

-        if (needCharacterAttributes)
+        if (needCharacterFormat)
         {
-            characterAttributes =
-                selectionManager.getCommonCharacterAttributes();
+            characterFormat =
+                selectionManager.getCommonCharacterFormat();
         }

-        var attributes:Object = {};
+        var format:Object = {};

         for each (p in names)
         {
-            kind = TextUtil.ATTRIBUTE_MAP[p];
+            kind = TextUtil.FORMAT_MAP[p];

             if (kind == TextUtil.CONTAINER)
-                attributes[p] = containerAttributes[p];
+                format[p] = containerFormat[p];
             else if (kind == TextUtil.PARAGRAPH)
-                attributes[p] = paragraphAttributes[p];
+                format[p] = paragraphFormat[p];
             else if (kind == TextUtil.CHARACTER)
-                attributes[p] = characterAttributes[p];
+                format[p] = characterFormat[p];
         }

-        return attributes;
+        return format;
     }

     /**
@@ -1815,57 +1815,57 @@
      *  setAttributes({ fontSize: 12, color: 0xFF0000 })
      *  will set the fontSize and color of the selection.
      *  The supported attributes are those in the
-     *  ICharacterAttributes and IParagraphAttributes interfaces.
+     *  ICharacterFormat and IParagraphFormat interfaces.
      */
     public function setAttributes(attributes:Object):void
     {
-        var containerAttributes:ContainerAttributes;
-        var paragraphAttributes:ParagraphAttributes;
-        var characterAttributes:CharacterAttributes;
+        var containerFormat:ContainerFormat;
+        var paragraphFormat:ParagraphFormat;
+        var characterFormat:CharacterFormat;

         for (var p:String in attributes)
         {
-            var kind:String = TextUtil.ATTRIBUTE_MAP[p];
+            var kind:String = TextUtil.FORMAT_MAP[p];

             if (kind == TextUtil.CONTAINER)
             {
-                if (!containerAttributes)
-                   containerAttributes =  new ContainerAttributes();
-                containerAttributes[p] = attributes[p];
+                if (!containerFormat)
+                   containerFormat =  new ContainerFormat();
+                containerFormat[p] = attributes[p];
             }
             else if (kind == TextUtil.PARAGRAPH)
             {
-                if (!paragraphAttributes)
-                   paragraphAttributes =  new ParagraphAttributes();
-                paragraphAttributes[p] = attributes[p];
+                if (!paragraphFormat)
+                   paragraphFormat =  new ParagraphFormat();
+                paragraphFormat[p] = attributes[p];
             }
             else if (kind == TextUtil.CHARACTER)
             {
-                if (!characterAttributes)
-                   characterAttributes =  new CharacterAttributes();
-                characterAttributes[p] = attributes[p];
+                if (!characterFormat)
+                   characterFormat =  new CharacterFormat();
+                characterFormat[p] = attributes[p];
             }
         }

         var editManager:TextViewEditManager =
             TextViewEditManager(textFlow.selectionManager);

-        if (containerAttributes)
+        if (containerFormat)
         {
             editManager.execute(new ContainerStyleChangeOperation(
-                editManager, containerAttributes));
+                editManager, containerFormat));
         }

-        if (paragraphAttributes)
+        if (paragraphFormat)
         {
             editManager.execute(new ParagraphStyleChangeOperation(
-                editManager, paragraphAttributes));
+                editManager, paragraphFormat));
         }

-        if (characterAttributes)
+        if (characterFormat)
         {
             editManager.execute(new StyleChangeOperation(
-                editManager, characterAttributes));
+                editManager, characterFormat));
         }
     }