Transferred from the Adobe Open Source Subversion Repository

Revision: 20024
Author:   gruehle@adobe.com
Date:     2011-01-31T23:19:49.749584Z

Log Message:
-----------
TextAreaSkin fixes:
* Change the way the StyleableTextField is managed within the skin. It is now wrapped by a Group (instead of a VGroup), and positioned/sized with constraints.
* Add constraint support to StyleableTextField
* Add minHeight/minWidth to StyleableTextField
* Fixed several issues with TextArea being sized by constraints or percent sizes
* Add support for lineBreak="explicit"

QE notes:
Doc notes:
Bugs: SDK-29301, SDK-29255, SDK-29215, SDK-29210, SDK-27928
Reviewer: Ryan, Jason SJ
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -35,6 +35,7 @@
 import flash.utils.Dictionary;

 import mx.core.DesignLayer;
+import mx.core.IInvalidating;
 import mx.core.FlexGlobals;
 import mx.core.IVisualElement;
 import mx.core.UIComponent;
@@ -294,6 +295,11 @@
                 }
             }

+			// Multi-line text enables internal scrolling if we use textHeight. Adding
+			// half of the padding (2 pixels) solves that problem.
+			if (numLines > 1)
+				_measuredTextSize.y += TEXT_HEIGHT_PADDING / 2;
+
             invalidateTextSizeFlag = false;
         }

@@ -573,7 +579,25 @@
     {
         return _isTruncated;
     }
-
+
+	//----------------------------------
+	//  minHeight
+	//----------------------------------
+
+	/**
+	 *  @copy mx.core.UIComponent#minHeight
+	 */
+    public var minHeight:Number;
+
+	//----------------------------------
+	//  minWidth
+	//----------------------------------
+
+	/**
+	 *  @copy mx.core.UIComponent#minWidth
+	 */
+	public var  minWidth:Number;
+
     //--------------------------------------------------------------------------
     //
     //  IEditableText implementation
@@ -798,6 +822,13 @@
      */
     public function scrollToRange(anchorPosition:int, activePosition:int):void
     {
+		// Pass to delegate, if defined
+		if (scrollToRangeDelegate != null)
+		{
+			scrollToRangeDelegate(anchorPosition, activePosition);
+			return;
+		}
+
         // If either part of the selection is in range (determined by
         // a non-null return value from getCharBoundaries()), we
         // don't need to do anything.
@@ -1445,7 +1476,7 @@
      */
     public function getMinBoundsHeight(postLayoutTransform:Boolean=true):Number
     {
-        return 0;
+        return isNaN(minHeight) ? 0 : minHeight;
     }

     /**
@@ -1453,7 +1484,7 @@
      */
     public function getMinBoundsWidth(postLayoutTransform:Boolean=true):Number
     {
-        return 0;
+        return isNaN(minWidth) ? 0 : minWidth;
     }

     /**
@@ -1663,42 +1694,278 @@
     //  bottom
     //----------------------------------

+	private var _bottom:Object;
+
     /**
      * @private
      */
     public function get bottom():Object
     {
+        return _bottom;
+    }
+
+    /**
+     * @private
+     */
+    public function set bottom(value:Object):void
+    {
+		if (_bottom == value)
+			return;
+
+		_bottom = value;
+		invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  hasLayoutMatrix3D
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get hasLayoutMatrix3D():Boolean
+    {
+        return false;
+    }
+
+    //----------------------------------
+    //  horizontalCenter
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get horizontalCenter():Object
+    {
         return null;
     }

     /**
      * @private
      */
-    public function set bottom(value:Object):void
+    public function set horizontalCenter(value:Object):void
     {
         // do nothing
     }

     //----------------------------------
-    //  hasLayoutMatrix3D
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get hasLayoutMatrix3D():Boolean
+    //  includeInLayout
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get includeInLayout():Boolean
+    {
+        return true;
+    }
+
+    /**
+     * @private
+     */
+    public function set includeInLayout(value:Boolean):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  left
+    //----------------------------------
+
+	private var _left:Object;
+
+    /**
+     * @private
+     */
+    public function get left():Object
+    {
+        return _left;
+    }
+
+    /**
+     * @private
+     */
+    public function set left(value:Object):void
+    {
+		if (_left == value)
+			return;
+
+		_left = value;
+		invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  percentHeight
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get percentHeight():Number
+    {
+        return NaN;
+    }
+
+    /**
+     * @private
+     */
+    public function set percentHeight(value:Number):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  percentWidth
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get percentWidth():Number
+    {
+        return NaN;
+    }
+
+    /**
+     * @private
+     */
+    public function set percentWidth(value:Number):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  right
+    //----------------------------------
+
+	private var _right:Object;
+
+    /**
+     * @private
+     */
+    public function get right():Object
+    {
+        return _right;;
+    }
+
+    /**
+     * @private
+     */
+    public function set right(value:Object):void
+    {
+		if (_right == value)
+			return;
+
+		_right = value;
+		invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  top
+    //----------------------------------
+
+	private var _top:Object;
+
+    /**
+     * @private
+     */
+    public function get top():Object
+    {
+        return _top;
+    }
+
+    /**
+     * @private
+     */
+    public function set top(value:Object):void
+    {
+		if (_top == value)
+			return;
+
+		_top = value;
+		invalidateParentSizeAndDisplayList();
+    }
+
+    //----------------------------------
+    //  verticalCenter
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get verticalCenter():Object
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set verticalCenter(value:Object):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  depth
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get depth():Number
+    {
+        return 0;
+    }
+
+    /**
+     * @private
+     */
+    public function set depth(value:Number):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  designLayer
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get designLayer():DesignLayer
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set designLayer(value:DesignLayer):void
+    {
+        // do nothing
+    }
+
+    //----------------------------------
+    //  is3D
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get is3D():Boolean
     {
         return false;
     }

     //----------------------------------
-    //  horizontalCenter
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get horizontalCenter():Object
+    //  owner
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get owner():DisplayObjectContainer
     {
         return null;
     }
@@ -1706,243 +1973,51 @@
     /**
      * @private
      */
-    public function set horizontalCenter(value:Object):void
+    public function set owner(value:DisplayObjectContainer):void
     {
         // do nothing
     }

     //----------------------------------
-    //  includeInLayout
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get includeInLayout():Boolean
-    {
-        return true;
-    }
-
-    /**
-     * @private
-     */
-    public function set includeInLayout(value:Boolean):void
+    //  postLayoutTransformOffsets
+    //----------------------------------
+
+    /**
+     * @private
+     */
+    public function get postLayoutTransformOffsets():TransformOffsets
+    {
+        return null;
+    }
+
+    /**
+     * @private
+     */
+    public function set postLayoutTransformOffsets(value:TransformOffsets):void
     {
         // do nothing
     }
-
-    //----------------------------------
-    //  left
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get left():Object
-    {
-        return null;
-    }
-
-    /**
-     * @private
-     */
-    public function set left(value:Object):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  percentHeight
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get percentHeight():Number
-    {
-        return NaN;
-    }
-
-    /**
-     * @private
-     */
-    public function set percentHeight(value:Number):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  percentWidth
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get percentWidth():Number
-    {
-        return NaN;
-    }
-
-    /**
-     * @private
-     */
-    public function set percentWidth(value:Number):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  right
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get right():Object
-    {
-        return null;
-    }
-
-    /**
-     * @private
-     */
-    public function set right(value:Object):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  top
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get top():Object
-    {
-        return null;
-    }
-
-    /**
-     * @private
-     */
-    public function set top(value:Object):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  verticalCenter
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get verticalCenter():Object
-    {
-        return null;
-    }
-
-    /**
-     * @private
-     */
-    public function set verticalCenter(value:Object):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  depth
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get depth():Number
-    {
-        return 0;
-    }
-
-    /**
-     * @private
-     */
-    public function set depth(value:Number):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  designLayer
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get designLayer():DesignLayer
-    {
-        return null;
-    }
-
-    /**
-     * @private
-     */
-    public function set designLayer(value:DesignLayer):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  is3D
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get is3D():Boolean
-    {
-        return false;
-    }
-
-    //----------------------------------
-    //  owner
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get owner():DisplayObjectContainer
-    {
-        return null;
-    }
-
-    /**
-     * @private
-     */
-    public function set owner(value:DisplayObjectContainer):void
-    {
-        // do nothing
-    }
-
-    //----------------------------------
-    //  postLayoutTransformOffsets
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    public function get postLayoutTransformOffsets():TransformOffsets
-    {
-        return null;
-    }
-
-    /**
-     * @private
-     */
-    public function set postLayoutTransformOffsets(value:TransformOffsets):void
-    {
-        // do nothing
-    }
-
+
+
+	/**
+	 *  Helper method to invalidate parent size and display list if
+	 *  this object affects its layout (includeInLayout is true).
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.5
+	 *  @productversion Flex 4
+	 */
+	private function invalidateParentSizeAndDisplayList():void
+	{
+		// We want to invalidate both the parent size and parent display list.
+		if (parent && parent is IInvalidating)
+		{
+			IInvalidating(parent).invalidateSize();
+			IInvalidating(parent).invalidateDisplayList();
+		}
+	}
+
     //--------------------------------------------------------------------------
     //
     //  Variables
@@ -1968,6 +2043,10 @@
     // text placement.
     mx_internal var useTightTextBounds:Boolean = true;

+	// Delegate function for scrollToRange. If defined, the scrollToRange
+	// method is delegated to this function.
+	mx_internal var scrollToRangeDelegate:Function;
+
     private static var supportedStyles:String = "textAlign fontFamily fontWeight fontStyle color fontSize textDecoration textIndent leading letterSpacing"

     private var invalidateStyleFlag:Boolean = true;


don't fail if fontsize value contains "px"

--- plugins/closedcaptionsFlexible_plugin/src/com/kaltura/kdpfl/plugin/component/ClosedCaptions.as
+++ plugins/closedcaptionsFlexible_plugin/src/com/kaltura/kdpfl/plugin/component/ClosedCaptions.as
@@ -427,7 +427,7 @@
 			}
 			tf.color = Number(colorString);
 			tf.font = style.@xmlns_tts::fontFamily.length() ? style.@xmlns_tts::fontFamily[0].toString() : defaultFontFamily;
-			tf.size = style.@xmlns_tts::fontSize.length() ? style.@xmlns_tts::fontSize[0].toString() : defaultFontSize;
+			tf.size = style.@xmlns_tts::fontSize.length() ? String(style.@xmlns_tts::fontSize[0].toString()).replace("px","") : defaultFontSize;

 			return tf;


Update menuColourIdiomes.as

Update menuColourIdiomes.as

--- com/segonquart/menuColourIdiomes.as
+++ com/segonquart/menuColourIdiomes.as
@@ -2,7 +2,7 @@
 import mx.transitions.easing.*;
 import com.mosesSupposes.fuse.*;

-class menuColouridiomes extends MoviieClip
+class com.segonquart.menuColouridiomes extends MoviieClip

 	{
 		public var cat, es, en ,fr:MovieClip;


Removed pointless 8-char optimization.
Now it is more useful for this to hash identically as in Java.

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

--- src/as/com/threerings/util/StringUtil.as
+++ src/as/com/threerings/util/StringUtil.as
@@ -44,10 +44,9 @@
     {
         var code :int = 0;
         if (str != null) {
-            // sample at most 8 chars
-            var lastChar :int = Math.min(8, str.length);
-            for (var ii :int = 0; ii < lastChar; ii++) {
-                code = code * 31 + str.charCodeAt(ii);
+            // hash identically to Java's String.hashCode(), for various reasons
+            for (var ii :int = 0; ii < str.length; ii++) {
+                code = 31 * code + str.charCodeAt(ii);
             }
         }
         return code;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

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

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

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

 package mx.collections
 {


Add animations to scene

Add animations to scene

--- src/com/merlinds/miracle_tool/viewer/ViewerView.as
+++ src/com/merlinds/miracle_tool/viewer/ViewerView.as
@@ -8,7 +8,7 @@
 	import com.bit101.components.Window;
 	import com.merlinds.debug.log;
 	import com.merlinds.miracle.Miracle;
-	import com.merlinds.miracle.animations.Animation;
+	import com.merlinds.miracle.animations.AnimationHelper;
 	import com.merlinds.miracle.display.MiracleDisplayObject;
 	import com.merlinds.miracle.display.MiracleImage;
 	import com.merlinds.miracle.utils.Asset;
@@ -73,8 +73,8 @@
 			var result:Array = [];
 			var reader:MafReader = new MafReader();
 			reader.execute(bytes);
-			var animations:Vector.<Animation> = reader.animations;
-			for each(var animation:Animation in animations){
+			var animations:Vector.<AnimationHelper> = reader.animations;
+			for each(var animation:AnimationHelper in animations){
 				result.push(animation.name);
 			}
 			return result;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/advancedgrids/src/mx/collections/SummaryField2.as
+++ frameworks/projects/advancedgrids/src/mx/collections/SummaryField2.as
@@ -0,0 +1,206 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.collections
+{
+
+/**
+ *  The SummaryField2 class represents a single property in a SummaryRow instance.
+ *  Each SummaryRow instance specifies one or more SummayField2 instances
+ *  that are used to create a data summary.
+ *
+ *
Note: In the previous release of Flex, you used the SummaryField class
+ *  to create summary data.
+ *  The SummaryField2 class is new for Flex 4 and provides better performance than SummaryField.

+ *
+ *
Use the dataField property to specify the data field used to generate the summary,
+ *  the label property to specify the name of the data field created to hold the summary data,
+ *  and the summaryOperation property to specify how to create the summary for numeric fields.
+ *  You can specify one of the following values:
+ *  SUM, MIN, MAX, AVG, or COUNT.

+ *  Or you can specify an ISummaryCalculator implementation to calculate the summaries.
+ *
+ *
The following example creates summary rows based on two fields of the data provider
+ *  of the AdvancedDataGrid control:

+ *
+ *

+ *  <mx:AdvancedDataGrid id="myADG"
+ *    initialize="gc.refresh();">
+ *    <mx:dataProvider>
+ *      <mx:GroupingCollection id="gc" source="{dpFlat}">
+ *        <mx:Grouping>
+ *          <mx:GroupingField name="Region">
+ *            <mx:summaries>
+ *              <mx:SummaryRow summaryPlacement="group">
+ *                <mx:fields>
+ *                  <mx:SummaryField2 dataField="Actual"
+ *                    label="Min Actual" summaryOperation="MIN"/>
+ *                  <mx:SummaryField2 dataField="Actual"
+ *                    label="Max Actual" summaryOperation="MAX"/>
+ *                </mx:fields>
+ *              </mx:SummaryRow>
+ *            </mx:summaries>
+ *          </mx:GroupingField>
+ *          <mx:GroupingField name="Territory">
+ *            <mx:summaries>
+ *              <mx:SummaryRow summaryPlacement="group">
+ *                <mx:fields>
+ *                  <mx:SummaryField2 dataField="Actual"
+ *                    label="Min Actual" summaryOperation="MIN"/>
+ *                  <mx:SummaryField2 dataField="Actual"
+ *                    label="Max Actual" summaryOperation="MAX"/>
+ *                </mx:fields>
+ *              </mx:SummaryRow>
+ *            </mx:summaries>
+ *          </mx:GroupingField>
+ *        </mx:Grouping>
+ *      </mx:GroupingCollection>
+ *    </mx:dataProvider>
+ *
+ *    <mx:columns>
+ *      <mx:AdvancedDataGridColumn dataField="Region"/>
+ *      <mx:AdvancedDataGridColumn dataField="Territory_Rep"
+ *        headerText="Territory Rep"/>
+ *      <mx:AdvancedDataGridColumn dataField="Actual"/>
+ *      <mx:AdvancedDataGridColumn dataField="Estimate"/>
+ *      <mx:AdvancedDataGridColumn dataField="Min Actual"/>
+ *      <mx:AdvancedDataGridColumn dataField="Max Actual"/>
+ *    </mx:columns>
+ *  </mx:AdvancedDataGrid>
+ *

+ *
+ *  @mxml
+ *
+ *  The <mx.SummaryField2> inherits all the tag attributes of its superclass,
+ *  and defines the following tag attributes:

+ *
+ *

+ *  <mx:SummaryField2
+ *  Properties
+ *    dataField="No default"
+ *    label="No default"
+ *    summaryOperation="SUM"
+ *  />
+ *

+ *
+ *  @see mx.controls.AdvancedDataGrid
+ *  @see mx.collections.GroupingField
+ *  @see mx.collections.SummaryRow
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class SummaryField2
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param dataField Data field for which the summary is computed.
+     *
+     *  @param summaryOperation The function that should be performed on the children.
+     *  You can specify one of the following values for numeric fields:
+     *  SUM, MIN, MAX, AVG, or COUNT.
+     *  Or you can specify an ISummaryCalculator implementation to calculate the summaries.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function SummaryField2(dataField:String = null, summaryOperation:Object = "SUM")
+    {
+        super();
+
+        this.dataField = dataField;
+        this.summaryOperation = summaryOperation;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  dataField
+    //----------------------------------
+
+    /**
+     * Data field for which the summary is computed.
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var dataField:String;
+
+    //----------------------------------
+    //  label
+    //----------------------------------
+
+    /**
+     *  The property used inside the summary object,
+     *  an instance of the SummaryObject class, to
+     *  hold summary information.
+     *
+     *
For example, if you set the label property to "Summary",
+     *  then the computed summary is placed in a property named "Summary"
+     *  in the summary object. The property of the SummaryObject instance
+     *  containing the summary data will appear as below:

+     *
+     *
{Summary:1000}

+     *
+     *  @see mx.collections.SummaryObject
+     *  @see mx.collections.SummaryRow#summaryObjectFunction
+     *  @see #summaryFunction
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var label:String;
+
+     /**
+      *  The summary performed on the children.
+      *  The value of this property can be one of the following:
+      *
+      *

+      *
For numeric fields: SUM, MIN,
+      *       MAX, AVG, or COUNT.

+      *
An instance of a class that implements the custom ISummaryCalculator interface
+      *       to calculate a custom summary.

+      *

+      *
+      *  @default SUM
+      *  @see mx.collections.ISummaryCalculator
+      *
+      *  @langversion 3.0
+      *  @playerversion Flash 10
+      *  @playerversion AIR 1.5
+      *  @productversion Flex 4
+      */
+    public var summaryOperation:Object = "SUM";
+}
+
+}


FLEX-32249 Now AdvancedDataGrid.makeListData() uses the HierarchicalCollectionViewCursor through its IHierarchicalCollectionViewCursor interface, so that other cursors can be used which don't extend HierarchicalCollectionViewCursor.

--- frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
+++ frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as
@@ -20,89 +20,89 @@
 package mx.controls
 {

-import flash.display.DisplayObject;
-import flash.display.Graphics;
-import flash.display.Shape;
-import flash.display.Sprite;
-import flash.events.Event;
-import flash.events.KeyboardEvent;
-import flash.events.MouseEvent;
-import flash.geom.Point;
-import flash.geom.Rectangle;
-import flash.ui.Keyboard;
-import flash.utils.Dictionary;
-import flash.utils.describeType;
-import flash.utils.getDefinitionByName;
-import flash.utils.getQualifiedClassName;
-
-import mx.collections.ArrayCollection;
-import mx.collections.CursorBookmark;
-import mx.collections.HierarchicalCollectionView;
-import mx.collections.HierarchicalCollectionViewCursor;
-import mx.collections.HierarchicalData;
-import mx.collections.ICollectionView;
-import mx.collections.IGroupingCollection;
-import mx.collections.IGroupingCollection2;
-import mx.collections.IHierarchicalCollectionView;
-import mx.collections.IHierarchicalData;
-import mx.collections.IViewCursor;
-import mx.collections.ItemResponder;
-import mx.collections.Sort;
-import mx.collections.SortField;
-import mx.collections.SummaryObject;
-import mx.collections.errors.ItemPendingError;
-import mx.controls.advancedDataGridClasses.AdvancedDataGridBaseSelectionData;
-import mx.controls.advancedDataGridClasses.AdvancedDataGridBaseSelectionPending;
-import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
-import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnGroup;
-import mx.controls.advancedDataGridClasses.AdvancedDataGridGroupItemRenderer;
-import mx.controls.advancedDataGridClasses.AdvancedDataGridHeaderInfo;
-import mx.controls.advancedDataGridClasses.AdvancedDataGridListData;
-import mx.controls.advancedDataGridClasses.AdvancedDataGridRendererDescription;
-import mx.controls.advancedDataGridClasses.IAdvancedDataGridRendererProvider;
-import mx.controls.advancedDataGridClasses.SortInfo;
-import mx.controls.listClasses.BaseListData;
-import mx.controls.listClasses.IDropInListItemRenderer;
-import mx.controls.listClasses.IListItemRenderer;
-import mx.controls.listClasses.ListBaseSeekPending;
-import mx.controls.listClasses.ListRowInfo;
-import mx.core.ClassFactory;
-import mx.core.EdgeMetrics;
-import mx.core.EventPriority;
-import mx.core.FlexShape;
-import mx.core.FlexSprite;
-import mx.core.IDataRenderer;
-import mx.core.IFactory;
-import mx.core.IFlexDisplayObject;
-import mx.core.IInvalidating;
-import mx.core.IUITextField;
-import mx.core.ScrollPolicy;
-import mx.core.SpriteAsset;
-import mx.core.UIComponent;
-import mx.core.UIComponentGlobals;
-import mx.core.mx_internal;
-import mx.effects.Tween;
-import mx.events.AdvancedDataGridEvent;
-import mx.events.AdvancedDataGridEventReason;
-import mx.events.CollectionEvent;
-import mx.events.CollectionEventKind;
-import mx.events.DragEvent;
-import mx.events.FlexEvent;
-import mx.events.IndexChangedEvent;
-import mx.events.ListEvent;
-import mx.events.ListEventReason;
-import mx.events.ScrollEvent;
-import mx.events.ScrollEventDetail;
-import mx.events.ScrollEventDirection;
-import mx.events.TweenEvent;
-import mx.managers.DragManager;
-import mx.resources.IResourceManager;
-import mx.resources.ResourceManager;
-import mx.styles.ISimpleStyleClient;
-import mx.styles.IStyleClient;
-import mx.utils.UIDUtil;
-
-use namespace mx_internal;
+    import flash.display.DisplayObject;
+    import flash.display.Graphics;
+    import flash.display.Shape;
+    import flash.display.Sprite;
+    import flash.events.Event;
+    import flash.events.KeyboardEvent;
+    import flash.events.MouseEvent;
+    import flash.geom.Point;
+    import flash.geom.Rectangle;
+    import flash.ui.Keyboard;
+    import flash.utils.Dictionary;
+    import flash.utils.describeType;
+    import flash.utils.getDefinitionByName;
+    import flash.utils.getQualifiedClassName;
+
+    import mx.collections.ArrayCollection;
+    import mx.collections.CursorBookmark;
+    import mx.collections.HierarchicalCollectionView;
+    import mx.collections.HierarchicalData;
+    import mx.collections.ICollectionView;
+    import mx.collections.IGroupingCollection;
+    import mx.collections.IGroupingCollection2;
+    import mx.collections.IHierarchicalCollectionView;
+    import mx.collections.IHierarchicalCollectionViewCursor;
+    import mx.collections.IHierarchicalData;
+    import mx.collections.IViewCursor;
+    import mx.collections.ItemResponder;
+    import mx.collections.Sort;
+    import mx.collections.SortField;
+    import mx.collections.SummaryObject;
+    import mx.collections.errors.ItemPendingError;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridBaseSelectionData;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridBaseSelectionPending;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridColumnGroup;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridGroupItemRenderer;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridHeaderInfo;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridListData;
+    import mx.controls.advancedDataGridClasses.AdvancedDataGridRendererDescription;
+    import mx.controls.advancedDataGridClasses.IAdvancedDataGridRendererProvider;
+    import mx.controls.advancedDataGridClasses.SortInfo;
+    import mx.controls.listClasses.BaseListData;
+    import mx.controls.listClasses.IDropInListItemRenderer;
+    import mx.controls.listClasses.IListItemRenderer;
+    import mx.controls.listClasses.ListBaseSeekPending;
+    import mx.controls.listClasses.ListRowInfo;
+    import mx.core.ClassFactory;
+    import mx.core.EdgeMetrics;
+    import mx.core.EventPriority;
+    import mx.core.FlexShape;
+    import mx.core.FlexSprite;
+    import mx.core.IDataRenderer;
+    import mx.core.IFactory;
+    import mx.core.IFlexDisplayObject;
+    import mx.core.IInvalidating;
+    import mx.core.IUITextField;
+    import mx.core.ScrollPolicy;
+    import mx.core.SpriteAsset;
+    import mx.core.UIComponent;
+    import mx.core.UIComponentGlobals;
+    import mx.core.mx_internal;
+    import mx.effects.Tween;
+    import mx.events.AdvancedDataGridEvent;
+    import mx.events.AdvancedDataGridEventReason;
+    import mx.events.CollectionEvent;
+    import mx.events.CollectionEventKind;
+    import mx.events.DragEvent;
+    import mx.events.FlexEvent;
+    import mx.events.IndexChangedEvent;
+    import mx.events.ListEvent;
+    import mx.events.ListEventReason;
+    import mx.events.ScrollEvent;
+    import mx.events.ScrollEventDetail;
+    import mx.events.ScrollEventDirection;
+    import mx.events.TweenEvent;
+    import mx.managers.DragManager;
+    import mx.resources.IResourceManager;
+    import mx.resources.ResourceManager;
+    import mx.styles.ISimpleStyleClient;
+    import mx.styles.IStyleClient;
+    import mx.utils.UIDUtil;
+
+    use namespace mx_internal;

 //--------------------------------------
 //  Events
@@ -3583,7 +3583,7 @@
             advancedDataGridListData =
                 super.makeListData(data, uid, rowNum,columnNum,column) as AdvancedDataGridListData;

-        if (iterator && iterator is HierarchicalCollectionViewCursor && columnNum == treeColumnIndex
+        if (iterator && iterator is IHierarchicalCollectionViewCursor && columnNum == treeColumnIndex
                         && !(data is AdvancedDataGridColumn))
             initListData(data, advancedDataGridListData);
         else


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/framework/src/mx/binding/StaticPropertyWatcher.as
+++ frameworks/projects/framework/src/mx/binding/StaticPropertyWatcher.as
@@ -0,0 +1,227 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.binding
+{
+
+import flash.events.Event;
+import flash.events.IEventDispatcher;
+import mx.core.EventPriority;
+import mx.events.PropertyChangeEvent;
+
+[ExcludeClass]
+
+/**
+ *  @private
+ */
+public class StaticPropertyWatcher extends Watcher
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Create a StaticPropertyWatcher
+     *
+     *  @param prop The name of the static property to watch.
+     *  @param event The event type that indicates the static property has changed.
+     *  @param listeners The binding objects that are listening to this Watcher.
+     *  @param propertyGetter A helper function used to access non-public variables.
+     */
+    public function StaticPropertyWatcher(propertyName:String,
+                                          events:Object,
+                                          listeners:Array,
+                                          propertyGetter:Function = null)
+    {
+        super(listeners);
+
+        _propertyName = propertyName;
+        this.events = events;
+        this.propertyGetter = propertyGetter;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The parent class of this static property.
+     */
+    private var parentObj:Class;
+
+    /**
+     *  The events that indicate the static property has changed
+     */
+    protected var events:Object;
+
+    /**
+     *  Storage for the propertyGetter property.
+     */
+    private var propertyGetter:Function;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  propertyName
+    //----------------------------------
+
+    /**
+     *  Storage for the propertyName property.
+     */
+    private var _propertyName:String;
+
+    /**
+     *  The name of the property this Watcher is watching.
+     */
+    public function get propertyName():String
+    {
+        return _propertyName;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Watcher
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  If the parent has changed we need to update ourselves
+     */
+    override public function updateParent(parent:Object):void
+    {
+        // The assumption is that parent is of type, Class, and that
+        // the class has a static variable or property,
+        // staticEventDispatcher, of type IEventDispatcher.
+        parentObj = Class(parent);
+
+        if (parentObj["staticEventDispatcher"] != null)
+        {
+            for (var eventType:String in events)
+            {
+                if (eventType != "__NoChangeEvent__")
+                {
+                    var eventDispatcher:IEventDispatcher = parentObj["staticEventDispatcher"];
+
+                    eventDispatcher.addEventListener(eventType, eventHandler, false,
+                                                     EventPriority.BINDING, true);
+                }
+            }
+        }
+
+        // Now get our property.
+        wrapUpdate(updateProperty);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function shallowClone():Watcher
+    {
+        var clone:StaticPropertyWatcher = new StaticPropertyWatcher(_propertyName,
+                                                                    events,
+                                                                    listeners,
+                                                                    propertyGetter);
+
+        return clone;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function traceInfo():String
+    {
+        return ("StaticPropertyWatcher(" + parentObj + "." + _propertyName +
+                "): events = [" + eventNamesToString() + "]");
+    }
+
+    /**
+     *  @private
+     */
+    private function eventNamesToString():String
+    {
+        var s:String = " ";
+
+        for (var ev:String in events)
+        {
+            s += ev + " ";
+        }
+
+        return s;
+    }
+
+    /**
+     *  Gets the actual property then updates
+     *  the Watcher's children appropriately.
+     */
+    private function updateProperty():void
+    {
+        if (parentObj)
+        {
+            if (propertyGetter != null)
+            {
+                value = propertyGetter.apply(parentObj, [ _propertyName ]);
+            }
+            else
+            {
+                value = parentObj[_propertyName];
+            }
+        }
+        else
+        {
+            value = null;
+        }
+
+        updateChildren();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The generic event handler.
+     *  The only event we'll hear indicates that the property has changed.
+     */
+    public function eventHandler(event:Event):void
+    {
+        if (event is PropertyChangeEvent)
+        {
+            var propName:Object = PropertyChangeEvent(event).property
+
+            if (propName != _propertyName)
+                return;
+        }
+
+        wrapUpdate(updateProperty);
+
+        notifyListeners(events[event.type]);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3972
Author:   smgilson@adobe.com
Date:     2008-10-30T20:17:56.264984Z

Log Message:
-----------
Add more @privates to match up with [ExcludeClass]

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponentGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ContainerGlobals.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/messaging/config/LoaderConfig.as</path>

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/mx/src/mx/controls/sliderClasses/SliderDataTip.as
+++ frameworks/projects/mx/src/mx/controls/sliderClasses/SliderDataTip.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.sliderClasses
+{
+
+import mx.controls.ToolTip;
+
+/**
+ *  The SliderDataTip class defines the tooltip used in the mx.controls.Slider control.
+ *  The class adds no additional functionality to mx.controls.ToolTip.
+ *  It is used only to apply a type selector style.
+ *
+ *  @see mx.controls.HSlider
+ *  @see mx.controls.VSlider
+ *  @see mx.controls.sliderClasses.Slider
+ *  @see mx.controls.sliderClasses.SliderLabel
+ *  @see mx.controls.sliderClasses.SliderThumb
+ */
+public class SliderDataTip extends ToolTip
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function SliderDataTip()
+	{
+		super();
+	}
+}
+
+}


XIFF-32: Restored the original behaviour of IncomingDataEvent

--- src/org/igniterealtime/xiff/core/XMPPConnection.as
+++ src/org/igniterealtime/xiff/core/XMPPConnection.as
@@ -1374,85 +1374,85 @@

 			if ( xmlData != null )
 			{
-				var rawData:ByteArray = new ByteArray();
-				rawData.writeUTFBytes( xmlData.toXMLString() );
+

 				// Add default namespace which is not usually included in XML from the server
 				xmlData.setNamespace( XMLStanza.DEFAULT_NS );
 				xmlData.normalize();

+				for each (var child:XML in xmlData.children())
+				{
+					// Read the data and send it to the appropriate parser
+					handleNodeType( child );
+				}
+			}
+		}
+
+		/**
+		 * Check if the incoming data is complete once added to any existing
+		 * incoming data.
+		 *
+		 * @param	data
+		 * @return XML that is complete, or just null in case it is not complete
+		 */
+		protected function checkIncomingData( bytedata:ByteArray ):XML
+		{
+			var data:String = bytedata.readUTFBytes( bytedata.length );
+			var rawXML:String = incompleteRawXML + data;
+
+			// Incoming event should have the real incoming string
+			var rawData:ByteArray = new ByteArray();
+			rawData.writeUTFBytes( rawXML );
+
+			// data coming in could also be parts of base64 encoded stuff.
+
+			// parseXML is more strict in AS3 so we must check for the presence of flash:stream
+			// the unterminated tag should be in the first string of xml data retured from the server
+
+			// http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/RegExp.html
+			var regExpOpen:RegExp = new RegExp( "<" + openingStreamTagSearch );
+			var regExpOpenExec:Object = regExpOpen.exec( rawXML );
+
+			var regExpClose:RegExp = new RegExp( closingStreamTag );
+			var regExpCloseExec:Object = regExpClose.exec( rawXML );
+
+			// Create qualified XML if needed.
+			// Anything that is not wrapped to stream:stream will get wrapped to it.
+			if ( regExpOpenExec == null )
+			{
+				rawXML = openingStreamTag + rawXML;
+			}
+			if ( regExpCloseExec == null )
+			{
+				// What about when the opening tag is the only, and self closing?
+				rawXML = rawXML.concat( closingStreamTag );
+			}
+
+			var isComplete:Boolean = false;
+			var xmlData:XML;
+
+			// Error handling to catch incomplete xml strings that have
+			// been truncated by the socket
+			try
+			{
+				xmlData = new XML( rawXML );
+				isComplete = true;
+				incompleteRawXML = '';
+			}
+			catch( err:Error )
+			{
+				trace(getTimer() + " - parseDataReceived. err: " + err.message);
+
+				// Concatenate the raw xml to the previous xml
+				incompleteRawXML += data;
+			}
+
+			if (isComplete)
+			{
 				var incomingEvent:IncomingDataEvent = new IncomingDataEvent();
 				incomingEvent.data = rawData;
 				dispatchEvent( incomingEvent );
-
-				var len:uint = xmlData.children().length();
-
-				for ( var i:int = 0; i < len; ++i )
-				{
-					// Read the data and send it to the appropriate parser
-					var currentNode:XML = xmlData.children()[ i ];
-					handleNodeType( currentNode );
-				}
-			}
-		}
-
-		/**
-		 * Check if the incoming data is complete once added to any existing
-		 * incoming data.
-		 *
-		 * @param	data
-		 * @return XML that is complete, or just null in case it is not complete
-		 */
-		protected function checkIncomingData( bytedata:ByteArray ):XML
-		{
-			var data:String = bytedata.readUTFBytes( bytedata.length );
-			var rawXML:String = incompleteRawXML + data;
-
-			// data coming in could also be parts of base64 encoded stuff.
-
-			// parseXML is more strict in AS3 so we must check for the presence of flash:stream
-			// the unterminated tag should be in the first string of xml data retured from the server
-
-			// http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/RegExp.html
-			var regExpOpen:RegExp = new RegExp( "<" + openingStreamTagSearch );
-			var regExpOpenExec:Object = regExpOpen.exec( rawXML );
-
-			var regExpClose:RegExp = new RegExp( closingStreamTag );
-			var regExpCloseExec:Object = regExpClose.exec( rawXML );
-
-			// Create qualified XML if needed.
-			// Anything that is not wrapped to stream:stream will get wrapped to it.
-			if ( regExpOpenExec == null )
-			{
-				rawXML = openingStreamTag + rawXML;
-			}
-			if ( regExpCloseExec == null )
-			{
-				// What about when the opening tag is the only, and self closing?
-				rawXML = rawXML.concat( closingStreamTag );
-			}
-
-			var isComplete:Boolean = false;
-			var xmlData:XML;
-
-			// Error handling to catch incomplete xml strings that have
-			// been truncated by the socket
-			try
-			{
-				xmlData = new XML( rawXML );
-				isComplete = true;
-				incompleteRawXML = '';
-			}
-			catch( err:Error )
-			{
-				trace(getTimer() + " - parseDataReceived. err: " + err.message);
-
-				// Concatenate the raw xml to the previous xml
-				incompleteRawXML += data;
-			}
-
-			if (isComplete)
-			{
+
 				return xmlData;
 			}
 			return null;


Transferred from the Adobe Open Source Subversion Repository

Revision: 8483
Author:   smgilson@adobe.com
Date:     2009-07-09T17:52:48.367800Z

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

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

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

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

--- frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as
+++ frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as
@@ -29,7 +29,7 @@
  *  attributes of its superclass and adds the following tag attributes:

  *
  *

- *  <ColorMatrixFilter
+ *  <s:ColorMatrixFilter
  *    Properties
  *    matrix="[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]"
  *  />


def: 7448, fix http flavor switching

def: 7448, fix http flavor switching

--- kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
@@ -362,11 +362,12 @@
 					_hasPlayed = false;
 					//Fixed weird issue, where the CHANGE_MEDIA would be caught by the mediator
 					// AFTER the new media has already loaded. Caused media never to be loaded.
-					if (designatedEntryId != _mediaProxy.vo.entry.id)
+					if (designatedEntryId != _mediaProxy.vo.entry.id || _mediaProxy.vo.isFlavorSwitching )
 					{
 						kMediaPlayer.unloadThumbnail()
 						cleanMedia();
 					}
+
 					break;
 				case NotificationType.DO_PLAY: //when the player asked to play
 					//first, load the media, if we didn't load it yet


allow user to control ad playback

allow user to control ad playback

--- kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
@@ -781,7 +781,7 @@

 		private function onDoPlay():void
-		{
+		{						trace("my controlADPlayback value  xxx:::::: 	"+_flashvars.controlAdPlayback);
 			if (_mediaProxy.vo.isLive)
 			{
 				if (_mediaProxy.vo.isOffline)
@@ -806,14 +806,16 @@
 				_sequenceProxy.playNextInSequence();
 				return;
 			}
-			else if (!_mediaProxy.vo.media || player.media != _mediaProxy.vo.media)
-			{
+			else if (!_mediaProxy.vo.media || player.media != _mediaProxy.vo.media && _flashvars.controlAdPlayback != "true")
+			{
+
 				if (_mediaProxy.vo.preferedFlavorBR && !isAkamaiHD())
 				{
 					_mediaProxy.vo.switchDue = true; //TODO: CHECK do we still need it?
 				}
 				_mediaProxy.loadWithMediaReady();
 				return;
+
 			}
 			else if(_mediaProxy.vo.entry is KalturaMixEntry &&
 				player.media.getTrait(MediaTraitType.DISPLAY_OBJECT)["isReadyForLoad"] &&


check for null visibleLayers on dynamic map service

--- src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as
+++ src/com/esri/viewer/components/toc/tocClasses/TocMapLayerItem.as
@@ -423,9 +423,18 @@
         else if (layer is ArcGISDynamicMapServiceLayer)
         {
             var arcGISDynamicMapServiceLayer:ArcGISDynamicMapServiceLayer = ArcGISDynamicMapServiceLayer(layer);
-            arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler);
+            if (arcGISDynamicMapServiceLayer.visibleLayers)
+            {
+                arcGISDynamicMapServiceLayer.visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler);
+            }
+            else
+            {
+                var visLayers:Array = getActualVisibleLayers(MapServiceUtil.getVisibleSubLayers(_dynamicMapServiceLayerInfos), _dynamicMapServiceLayerInfos);
+                ArcGISDynamicMapServiceLayer(layer).visibleLayers = new ArrayCollection(visLayers);
+                ArcGISDynamicMapServiceLayer(layer).visibleLayers.addEventListener(CollectionEvent.COLLECTION_CHANGE, visibleLayersChangeHandler);
+            }
+
             _visibleLayersChangeWatcher = ChangeWatcher.watch(arcGISDynamicMapServiceLayer, "visibleLayers", visibleLayersChange);
-
             _dynamicMapServiceLayerInfos = arcGISDynamicMapServiceLayer.dynamicLayerInfos ? arcGISDynamicMapServiceLayer.dynamicLayerInfos : arcGISDynamicMapServiceLayer.layerInfos;
             if (_isVisibleLayersSet)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17997
Author:   jszeto@adobe.com
Date:     2010-10-01T23:51:16.437475Z

Log Message:
-----------
ViewMenu appearance and layout update

Changed ViewMenuItem appearance
ViewMenuItem now subclasses ButtonSkin and uses fxg files for the three states
Changed ViewMenuSkin appearance
Implemented a new brick style layout for ViewMenuLayout

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/layouts/ViewMenuLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ViewMenuItem_showsCaret.fxg</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ViewMenuItem_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ViewMenuItem_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
@@ -94,7 +94,9 @@

     [SkinPart(required="false")]
     /**
-     *  Creates an action menu from this factory when the menu button is pressed
+     *  Dynamic skin part that defines the ViewMenu used to display the
+     *  view menu when the menu button is pressed. The default skin uses
+     *  a factory that generates an ViewMenu instance.
      */
     public var viewMenu:IFactory;

@@ -140,6 +142,11 @@

     private var _viewMenuOpen:Boolean = false;

+    /**
+     *  Opens the view menu if set to true and closes it if set to false.
+     *
+     *  @default false
+     */
     public function get viewMenuOpen():Boolean
     {
         return _viewMenuOpen;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/charts/src/mx/charts/chartClasses/InstanceCache.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/InstanceCache.as
@@ -0,0 +1,529 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts.chartClasses
+{
+
+import flash.text.TextFormat;
+
+import mx.core.ClassFactory;
+import mx.core.ContextualClassFactory;
+import mx.core.IFactory;
+import mx.core.UITextField;
+
+/**
+ *  InstanceCache is a utility that governs the task of creating and managing
+ *  a set of n object instances, where n changes frequently.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class InstanceCache
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param type The type of object to construct.
+     *  This can be either a Class or an IFactory.
+     *
+     *  @param parent An optional DisplayObject to add new instances to.
+     *
+     *  @param insertPosition Where in the parent's child list
+     *  to insert instances. Set to -1 to add the children to the end of the child list.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function InstanceCache(type:Object, parent:Object = null,
+                                  insertPosition:int = -1)
+    {
+        super();
+
+        _parent = parent;
+
+        if (type is IFactory)
+        {
+            _factory = IFactory(type);
+        }
+        else if (type is Class)
+        {
+            _class = Class(type);
+            _factory = new ContextualClassFactory(Class(type));
+        }
+
+        _insertPosition = insertPosition;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private var _parent:Object;
+
+    /**
+     *  @private
+     */
+    private var _class:Class = null;
+
+    /**
+     *  @private
+     */
+    private var _insertPosition:int;
+
+    /**
+     *  @private
+     */
+    private var _count:int = 0;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  count
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The number of items currently required in the cache.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get count():int
+    {
+        return _count;
+    }
+
+    /**
+     *  @private
+     */
+    public function set count(value:int):void
+    {
+        if (value == _count)
+            return;
+
+        var newInstanceCount:int = value;
+        var oldInstanceCount:int = _count;
+        var availableInstanceCount:int = _instances.length;
+        var insertBase:int;
+        if (_parent != null)
+        {
+              insertBase = Math.min(_insertPosition,
+                _parent.numChildren - availableInstanceCount);
+        }
+
+        if (newInstanceCount> oldInstanceCount)
+        {
+            if (!_factory)
+            {
+                value = 0;
+            }
+            else
+            {
+                for (var i:int = oldInstanceCount;
+                     i < newInstanceCount && i < availableInstanceCount;
+                     i++)
+                {
+                    if (hide)
+                        _instances[i].visible = true;
+
+                    if (_parent && remove)
+                    {
+                        if (insertBase >= 0)
+                            _parent.addChildAt(_instances[i],insertBase + i);
+                        else
+                            _parent.addChild(_instances[i]);
+                    }
+                }
+
+                for (; i < newInstanceCount; i++)
+                {
+                    var newInst:Object = _factory.newInstance();
+
+                    if (_parent)
+                    {
+                        if (insertBase > 0)
+                            _parent.addChildAt(newInst, insertBase + i);
+                        else
+                            _parent.addChild(newInst);
+                    }
+
+                    if (creationCallback != null)
+                        creationCallback(newInst,this);
+
+                    _instances.push(newInst);
+                }
+
+                applyProperties(availableInstanceCount, newInstanceCount);
+
+                if (_format)
+                    applyFormat(availableInstanceCount, newInstanceCount);
+            }
+        }
+
+        else if (newInstanceCount < oldInstanceCount)
+        {
+            if (remove)
+            {
+                for (i = newInstanceCount; i < oldInstanceCount; i++)
+                {
+                    _parent.removeChild(_instances[i]);
+                }
+            }
+
+            if (hide)
+            {
+                for (i = newInstanceCount; i < oldInstanceCount; i++)
+                {
+                    _instances[i].visible = false;
+                }
+            }
+
+            if (discard)
+                _instances = _instances.slice(0, newInstanceCount);
+        }
+
+        _count = value;
+    }
+
+    //----------------------------------
+    //  creationCallback
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  A callback invoked when new instances are created.
+     *  This callback has the following signature:
+     *

+     *  function creationCallback(newInstance:Object, cache:InstanceCache):void;
+     *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var creationCallback:Function;
+
+    //----------------------------------
+    //  discard
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  Determines if unneeded instances are discarded.
+     *  If set to true, extra elements are discarded
+     *  when the cache count is reduced.
+     *  Otherwise, extra elements are kept in a separate cache
+     *  and reused when the count is increased.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var discard:Boolean = false;
+
+    //----------------------------------
+    //  factory
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _factory:IFactory;
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  A factory that generates the type of object to cache.
+     *  Assigning to this discards all current instances
+     *  and recreate new instances of the correct type.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get factory():IFactory
+    {
+        return _factory;
+    }
+
+    /**
+     *  @private
+     */
+    public function set factory(value:IFactory):void
+    {
+        if (value == _factory ||
+            ((value is ClassFactory) &&
+            (_factory is ClassFactory) &&
+            (ClassFactory(_factory).generator == ClassFactory(value).generator) &&
+            (!(value is ContextualClassFactory))))
+            return;
+
+        _factory = value;
+        _class = null;
+
+        var instanceCount:Number = _count;
+        count = 0;
+        count = instanceCount;
+    }
+
+    //----------------------------------
+    //  format
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _format:TextFormat;
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  A TextFormat to apply to any instances created.
+     *  If set, this format is applied as the current and default format
+     *  for the contents of any instances created.
+     *  This property is only relevant if the factory
+     *  generates TextField instances.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get format():TextFormat
+    {
+        return _format;
+    }
+
+    /**
+     *  @private
+     */
+    public function set format(value:TextFormat):void
+    {
+        _format = value;
+
+        if (_format)
+            applyFormat(0, _instances.length);
+    }
+
+    //----------------------------------
+    //  hide
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  Determines if unneeded instances should be hidden.
+     *  If true, the visible property
+     *  is set to false on each extra element
+     *  when the cache count is reduced, and set to true
+     *  when the count is increased.
+     *
+     *
This property is only relevant when the factory
+     *  generates DisplayObjects.
+     *  Setting this property to true for other factory types
+     *  generates a run-time error.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var hide:Boolean = true;
+
+    //----------------------------------
+    //  insertPosition
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The position of the instance in the parent's child list.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function set insertPosition(value:int):void
+    {
+        if (value != _insertPosition)
+        {
+            _insertPosition = value;
+
+            if (_parent)
+            {
+            	var n:int = _instances.length;
+                for (var i:int = 0; i < n; i++)
+                {
+                    _parent.setChildIndex(_instances[i], i + _insertPosition);
+                }
+            }
+        }
+    }
+
+    //----------------------------------
+    //  instances
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _instances:Array /* of Object */= [];
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The Array of cached instances.
+     *  There may be more instances in this Array than currently requested.
+     *  You should rely on the count property
+     *  of the instance cache rather than the length of this Array.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get instances():Array /* of Object */
+    {
+        return _instances;
+    }
+
+    //----------------------------------
+    //  properties
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _properties:Object = {};
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  A hashmap of properties to assign to new instances.
+     *  Each key/value pair in this hashmap is assigned
+     *  to each new instance created.
+     *  The property hashmap is assigned to any existing instances when set.
+     *
+     *
The values in the hashmap are not cloned;
+     *  object values are shared by all instances.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get properties():Object
+    {
+        return _properties;
+    }
+
+    /**
+     *  @private
+     */
+    public function set properties(value:Object):void
+    {
+        _properties = value;
+
+        applyProperties(0, _instances.length);
+    }
+
+    //----------------------------------
+    //  remove
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  Determines if unneeded instances should be removed from their parent.
+     *  If true, the removeChild() method
+     *  is called on the parent for each extra element
+     *  when the cache count is reduced.
+     *
+     *
This property is only relevant when the factory
+     *  generates DisplayObjects.
+     *  Setting this property to true for other factory types
+     *  generates a run-time error.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var remove:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private function applyProperties(start:int, end:int):void
+    {
+        for (var i:int = start; i < end; i++)
+        {
+            var newInst:Object = _instances[i];
+
+            for (var p:String in _properties)
+            {
+                newInst[p] = _properties[p];
+            }
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function applyFormat(start:int, end:int):void
+    {
+        for (var i:int = start; i < end; i++)
+        {
+            var newField:UITextField = _instances[i];
+            newField.setTextFormat(_format);
+            newField.defaultTextFormat = _format;
+
+        }
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6322
Author:   clucier@adobe.com
Date:     2009-04-28T14:34:56.297137Z

Log Message:
-----------
Adding ITransientDeferredInstance which supports a reset() method, allowing deferred instances to be optionally cleaned up.  Compiler support added to generate an associated destruction method which conveniently nulls out any related document slots upon reset.

Added support for a new compile time attribute (itemDestructionPolicy)  for states, taking advantage of the new resettable factory.

Bugs: SDK-19828.
Reviewers: Paul Reilly, Glenn Reuhle
QE Notes: Will need new test written against the itemDestructionPolicy feature, spec has been updated.
Doc Notes: Will require new user guide writeup on itemDestructionPolicy.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/PrimitiveNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ITransientDeferredInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/ArrayNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DeferredInstanceFromClass.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/StatesModel.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/StatesGenerator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Model.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/VectorNode.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DeferredInstanceFromFunction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4/.project</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/java/flex-fxgutils/.project</path>

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

--- frameworks/projects/framework/src/mx/core/DeferredInstanceFromClass.as
+++ frameworks/projects/framework/src/mx/core/DeferredInstanceFromClass.as
@@ -26,7 +26,7 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-public class DeferredInstanceFromClass implements IDeferredInstance
+public class DeferredInstanceFromClass implements ITransientDeferredInstance
 {
     include "../core/Version.as";

@@ -98,6 +98,20 @@

 		return instance;
 	}
+
+    /**
+     *  Resets the state of our factory to the initial, uninitialized state.
+     *  The reference to our cached instance is cleared.
+     *
+     *  @langversion 4.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 4
+     */
+    public function reset():void
+    {
+        instance = null;
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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