Transferred from the Adobe Open Source Subversion Repository

Revision: 14346
Author:   jszeto@adobe.com
Date:     2010-02-22T23:18:39.759197Z

Log Message:
-----------
Merge revision 14345 from 4.x to trunk

Mirroring bug fixes

http://bugs.adobe.com/jira/browse/SDK-25561 - MX PopUpButton displays popup inconsistently when layoutDirection is set to rtl
http://bugs.adobe.com/jira/browse/SDK-25560 - MX ColorPicker displays popup inconsistently when layoutDirection is set to rtl

Translate the position of the popup from the mirrored coordinates to the un-mirrored global coordinates

http://bugs.adobe.com/jira/browse/SDK-25552 - The Spark CheckBox icon should be mirroring

Removed setting the icon layoutDirection = “ltr”. The icon should follow the mirroring of the component.

http://bugs.adobe.com/jira/browse/SDK-25484 - MX Slider datatip is incorrectly positioned when layoutDirection is rtl

Fixed two issues. The dataTip positioning is fixed by translating the position of the popup from the mirrored coordinates to the un-mirrored global coordinates. The second is fixing an issue of reversing the dataTipPosition when “left” or “right” when mirrored.

QE notes: None
Doc notes: None
Bugs: SDK-25561, SDK-25560, SDK-25552, SDK-25484
Reviewer: Hans
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>

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

--- frameworks/projects/mx/src/mx/controls/sliderClasses/Slider.as
+++ frameworks/projects/mx/src/mx/controls/sliderClasses/Slider.as
@@ -2397,6 +2397,15 @@
         var tPlacement:String =  getStyle("dataTipPlacement");
         var tOffset:Number = getStyle("dataTipOffset");

+        // If the layoutDirection is rtl, swap left and right placement
+        if (layoutDirection == "rtl")
+        {
+            if (tPlacement == "left")
+                tPlacement = "right";
+            else if (tPlacement == "right")
+                tPlacement = "left";
+        }
+
         // Need to special case tooltip position because the tooltip movieclip
         // resides in the root movie clip, instead of the Slider movieclip
         if (_direction == SliderDirection.HORIZONTAL)
@@ -2449,6 +2458,9 @@
                 relX -= (dataTip.width - thumb.height) / 2;
             }
         }
+
+        if (layoutDirection == "rtl")
+            relX += dataTip.width;

         var o:Point = new Point(relX, relY);
         var r:Point = localToGlobal(o);


enabled slider to snap to tickmarks

enabled slider to snap to tickmarks

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@628 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/controls/Slider.as
+++ src/reprise/controls/Slider.as
@@ -33,10 +33,13 @@
 		protected var m_dragStartMousePosition:Number;
 		protected var m_isDragging:Boolean;

-
-		/*public function Silder()
-		{
-		}*/
+		protected var m_allowsTickMarkValuesOnly:Boolean = false;
+		protected var m_numTickMarks:int = 2;
+
+
+		public function Slider()
+		{
+		}

 		/***************************************************************************
@@ -46,7 +49,7 @@
 		{
 			value = Math.min(value, m_maxValue);
 			value = Math.max(value, m_minValue);
-			m_value = value;
+			m_value = m_allowsTickMarkValuesOnly ? closestTickMarkValueToValue(value) : value;
 			if (!m_isDragging)
 			{
 				applyValue();
@@ -94,6 +97,31 @@
 			return m_isContinuous;
 		}

+		public function setAllowsTickMarkValuesOnly(bFlag:Boolean):void
+		{
+			m_allowsTickMarkValuesOnly = bFlag;
+		}
+
+		public function allowsTickMarkValuesOnly():Boolean
+		{
+			return m_allowsTickMarkValuesOnly;
+		}
+
+		public function setNumberOfTickMarks(num:int):void
+		{
+			m_numTickMarks = num;
+		}
+
+		public function numberOfTickMarks():int
+		{
+			return m_numTickMarks;
+		}
+
+		public function tickMarkValueAtIndex(index:int):Number
+		{
+			return (m_maxValue - m_minValue) / (m_numTickMarks - 1) * index;
+		}
+

 		/***************************************************************************
@@ -163,6 +191,14 @@
 			setValue(positionToValue(m_dragStartThumbPosition +
 				(m_track.mouseX - m_dragStartMousePosition)));
 			applyValue();
+		}
+
+		protected function closestTickMarkValueToValue(val:Number):Number
+		{
+			var diff:Number = (m_maxValue - m_minValue) / (m_numTickMarks - 1);
+			var index:int = Math.floor(val / diff);
+			if (val % diff > diff / 2) index++;
+			return index * diff;
 		}


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

--- frameworks/projects/automation/src/mx/automation/codec/ArrayPropertyCodec.as
+++ frameworks/projects/automation/src/mx/automation/codec/ArrayPropertyCodec.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.automation.codec
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 21744
Author:   aaltman@adobe.com
Date:     2011-07-28T01:12:55.468490Z

Log Message:
-----------
Removed padding from SDK StageText size calculations to match new runtime behavior

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as
@@ -71,10 +71,10 @@
         super.layoutContents(unscaledWidth, unscaledHeight);

         // position & size the text
-        var paddingLeft:Number = getCorrectedPadding("paddingLeft");
-        var paddingRight:Number = getCorrectedPadding("paddingRight");
-        var paddingTop:Number = getCorrectedPadding("paddingTop");
-        var paddingBottom:Number = getCorrectedPadding("paddingBottom");
+        var paddingLeft:Number = getStyle("paddingLeft");
+        var paddingRight:Number = getStyle("paddingRight");
+        var paddingTop:Number = getStyle("paddingTop");
+        var paddingBottom:Number = getStyle("paddingBottom");

         var unscaledTextWidth:Number = unscaledWidth - paddingLeft - paddingRight;
         var unscaledTextHeight:Number = unscaledHeight - paddingTop - paddingBottom;
@@ -96,10 +96,9 @@
         {
             var promptHeight:Number = getElementPreferredHeight(promptDisplay);
             var promptY:Number = Math.round(0.5 * (unscaledTextHeight - promptHeight)) + paddingTop;
-            var promptX:Number = getStyle("paddingLeft");

             setElementSize(promptDisplay, unscaledTextWidth, promptHeight);
-            setElementPosition(promptDisplay, promptX, promptY);
+            setElementPosition(promptDisplay, paddingLeft, promptY);
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5812
Author:   chaase@adobe.com
Date:     2009-03-31T18:34:56.901097Z

Log Message:
-----------
Fixed a bug where direct use of Animation failed because AnimationProperty was not setting up its internal keyframes with correct duration information, so the animation would skip immediately to the end.

Bugs: SDK-20356
QE Notes: spark/effects Mustella tests currently hosed, couldn't run test suite
Doc Notes: None
Reviewer: Jason
Testing: checkintests, Mustella effects tests could not be run (post-rename issues)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateColorInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/RotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/FadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateShaderTransitionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimationProperty.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/Rotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/MoveInstance.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/RotateInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/RotateInstance.as
@@ -274,7 +274,7 @@
         newY = Number((centerY - originalOffsetY).toFixed(1)); // use a precision of 1

         animationProperties =
-            [new AnimationProperty("rotation", angleFrom, angleTo, angleBy)];
+            [new AnimationProperty("rotation", angleFrom, angleTo, duration, angleBy)];

         super.play();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5270
Author:   hmuller@adobe.com
Date:     2009-03-12T19:10:16.600232Z

Log Message:
-----------

Modified Paths:
--------------
<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/components/Group.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/layout/HorizontalLayout.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/layout/LayoutBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -678,46 +678,35 @@
     /**
      *  @private
      *  Discard the ItemRenderers that aren't needed anymore, i.e. the ones
-     *  outside the logical range startIndex to endIndex.
-     *
-     *  IRs can be recycled if they're IDataRenderers and they're
-     *  not equal to the item they represent, i.e. if
-     *  renderersInView[item] != item.   More about item recycling
-     *  in the getElementAt() doc.
+     *  outside the range virtualLayoutStartIndex to virtualLayoutEndIndex.
+     *  Discarded IRs may be added to the freeRenderers list per the rules
+     *  defined in getVirtualElementAt().
      */
     private function finishVirtualLayout():void
     {
-        // At this point, we have renderers for the current rendering cycle at
-        // [virtualLayoutStartIndex. virtualLayoutEndIndex], but we may also have old
-        // ones that need to be removed at [oldVirtualLayoutStartIndex, oldVirtualLayoutEndIndex]
         if (oldVirtualLayoutStartIndex == -1 || oldVirtualLayoutEndIndex == -1)
             return;

-        // We want to remove item renderers at
-        // at [oldVirtualLayoutStartIndex, oldVirtualLayoutEndIndex]
-        // but excluding [virtualLayoutStartIndex. virtualLayoutEndIndex].
-        // Most of the time's we'll be removing one contiguous block
-        // before or after our on-screen item renderers, but sometimes
-        // we may be removing them before and after (in the case of
-        // the list changing heights)
+        // Remove the old ItemRenderers that aren't new ItemRenderers.  In other
+        // words remove the ItemRenderers from oldVirtualLayoutStartIndex to
+        // oldVirtualLayoutEndIndex, but skip the ones in the range
+        // virtualLayoutStartIndex to virtualLayoutEndIndex.

         for (var index:int = oldVirtualLayoutStartIndex; index <= oldVirtualLayoutEndIndex; index++)
         {
-            // if we encounter an IR in our current list of item renderers,
-            // let's smart-skip to the end.
+            // Skip the inView renderers
             if (index >= virtualLayoutStartIndex && index <= virtualLayoutEndIndex)
             {
                 index = virtualLayoutEndIndex;
                 continue;
             }

+            // Remove previously "in view" IR from the item=>IR table
             var elt:IVisualElement = indexToRenderer[index] as IVisualElement;
-
-            // Remove previously "in view" IRs from the item=>IR table
             delete indexToRenderer[index];
-
+
+            // Free or remove the IR.
             var item:Object = dataProvider.getItemAt(index);
-            // Free or remove the IR.
             if ((item != elt) && (elt is IDataRenderer))
             {
                 IDataRenderer(elt).data = null;  // reduce probability of leaks
@@ -725,10 +714,9 @@
                 elt.includeInLayout = false;
                 freeRenderers.push(elt);
             }
-            else
-            {
-                dispatchEvent(new RendererExistenceEvent(RendererExistenceEvent.RENDERER_REMOVE,
-                                false, false, elt, index, item));
+            else if (elt)
+            {
+                dispatchEvent(new RendererExistenceEvent(RendererExistenceEvent.RENDERER_REMOVE, false, false, elt, index, item));
                 super.removeChild(DisplayObject(elt));
             }
         }
@@ -779,7 +767,6 @@
             finishVirtualLayout();
             virtualLayoutUnderway = false;
         }
-        _contentChangeDeltas = null;
     }

     /**
@@ -924,29 +911,7 @@
         _layeringFlags |= (LAYERING_ENABLED | LAYERING_DIRTY);
         invalidateProperties();
     }
-
-    private var _contentChangeDeltas:Vector.<int> = null;
-
-
-    /**
-     *  @private
-     *  Provisional support for notifying the layout of upcoming changes to the
-     *  layout elements (item renderers).   The value of this property is a
-     *  vector where positive values indicate item addditions, and negative values
-     *  indicate item removals.   In both cases the index values are offset by one.
-     */
-    override mx_internal function get contentChangeDeltas():Vector.<int>
-    {
-        return _contentChangeDeltas;
-    }
-
-    private function appendContentChangeDelta(index:int):void
-    {
-        if (!_contentChangeDeltas)
-            _contentChangeDeltas = new Vector.<int>();
-        _contentChangeDeltas.push(index);
-    }
-
+
     /**
      *  Adds the itemRenderer for the specified dataProvider item to this DataGroup.
      *
@@ -963,10 +928,17 @@
      */
     mx_internal function itemAdded(item:Object, index:int):void
     {
+        if (layout)
+            layout.elementAdded(index);
+
         if (layout && layout.useVirtualLayout)
         {
-            appendContentChangeDelta(index+1);
-            indexToRenderer.splice(index, 0, null);
+            if ((index >= virtualLayoutStartIndex) && (index <= virtualLayoutEndIndex))
+            {
+                virtualLayoutEndIndex += 1;
+                indexToRenderer.splice(index, 0, null);
+            }
+
             invalidateSize();
             invalidateDisplayList();
             return;
@@ -1001,29 +973,31 @@
      */
     mx_internal function itemRemoved(item:Object, index:int):void
     {
+        if (layout)
+            layout.elementRemoved(index);
+
+        var myItemRenderer:IVisualElement = indexToRenderer[index];
         if (layout && layout.useVirtualLayout)
         {
-            appendContentChangeDelta(-(index+1));
-            indexToRenderer.splice(index, 1);
-            invalidateSize();
-            invalidateDisplayList();
-            return;
-        }
-
-        var myItemRenderer:IVisualElement = indexToRenderer[index];
-        indexToRenderer.splice(index, 1);
-
+            if ((index >= virtualLayoutStartIndex) && (index <= virtualLayoutEndIndex))
+            {
+                virtualLayoutEndIndex -= 1;
+                indexToRenderer.splice(index, 1);
+            }
+        }
+        else
+            indexToRenderer.splice(index, 0, null);
+
         dispatchEvent(new RendererExistenceEvent(
                       RendererExistenceEvent.RENDERER_REMOVE, false, false,
                       myItemRenderer, index, item));

-        // If the item and renderer are different objects, set the renderer data to
-        // null here to clear it out. Otherwise, the renderer keeps a reference to the item,
-        // which can cause problems later.
         if (myItemRenderer is IDataRenderer && myItemRenderer != item)
             IDataRenderer(myItemRenderer).data = null;

-        super.removeChild(myItemRenderer as DisplayObject);
+        var child:DisplayObject = myItemRenderer as DisplayObject;
+        if (child)
+            super.removeChild(child);

         invalidateSize();
         invalidateDisplayList();


Transferred from the Adobe Open Source Subversion Repository

Revision: 12469
Author:   jimurphy@adobe.com
Date:     2009-12-03T22:04:16.560316Z

Log Message:
-----------
fix offsets for FB.  Convert line ending from lf to crlf in svn for the proects directory only.  When checking project files in, be sure to save you files this way.  Another update to make sure happens is set the svn properties svn:eol-style = native and svn:mime-type = text/plain (these have been updated on theses files as well)

QE notes: make sure the proper class is selected
Doc notes: no
Bugs: http://bugs.adobe.com/jira/browse/SDK-24498
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
133 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/easing/Power.as
+++ frameworks/projects/spark/src/spark/effects/easing/Power.as
@@ -1,4 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
+		////////////////////////////////////////////////////////////////////////////////
 //
 //  ADOBE SYSTEMS INCORPORATED
 //  Copyright 2008 Adobe Systems Incorporated
@@ -12,13 +12,13 @@
 {
 /**
  *  The Power class defines the easing functionality using a polynomial expression.
- *  Easing consists of two phases: the acceleration, or ease in phase,
- *  followed by the deceleration, or ease out phase.
- *  The rate of acceleration and deceleration is based on
- *  the exponent property.
- *  The higher the value of the exponent property,
- *  the greater the acceleration and deceleration.
- *  Use the easeInFraction property to specify the percentage
+ *  Easing consists of two phases: the acceleration, or ease in phase,
+ *  followed by the deceleration, or ease out phase.
+ *  The rate of acceleration and deceleration is based on
+ *  the exponent property.
+ *  The higher the value of the exponent property,
+ *  the greater the acceleration and deceleration.
+ *  Use the easeInFraction property to specify the percentage
  *  of an animation accelerating.
  *
  *  @mxml
@@ -26,16 +26,16 @@
  *
The <s:Power> tag
  *  inherits all of the tag attributes of its of its superclass,
  *  and adds the following tag attributes:

- *
+ *
  *

  *  <s:Power
  *    id="ID"
- *    exponent="2"
+ *    exponent="2"
  *   />
  *

  *
  *  @includeExample examples/SinePowerEffectExample.mxml
- *
+ *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5
@@ -45,7 +45,7 @@
 {
     /**
      * Storage for the exponent property
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -53,16 +53,16 @@
      */
     private var _exponent:Number;
     /**
-     *  The exponent used in the easing calculation.
-     *  The higher the value of the exponent property,
-     *  the greater the acceleration and deceleration.
-     *  For example, to get quadratic behavior, set exponent to 2.
-     *  To get cubic behavior, set exponent to 3.
-     *  A value of 1 represents linear motion, and a value of 0
+     *  The exponent used in the easing calculation.
+     *  The higher the value of the exponent property,
+     *  the greater the acceleration and deceleration.
+     *  For example, to get quadratic behavior, set exponent to 2.
+     *  To get cubic behavior, set exponent to 3.
+     *  A value of 1 represents linear motion, and a value of 0
      *  returns 1 from the ease() method.
-     *
+     *
      *  @default 2
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -76,15 +76,15 @@
     {
         _exponent = value;
     }
-
+
     /**
      * Constructor.
-     *
-     *  @param easeInFraction The fraction of the overall duration
+     *
+     *  @param easeInFraction The fraction of the overall duration
      *  in the acceleration phase, between 0.0 and 1.0.
      *
      *  @param exponent The exponent used in the easing calculation.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -98,17 +98,17 @@

     /**
      *  @private
-     *  Returns a value that represents the eased fraction during the
-     *  ease in phase of the animation.
-     *  The easing calculation for Power is equal to
+     *  Returns a value that represents the eased fraction during the
+     *  ease in phase of the animation.
+     *  The easing calculation for Power is equal to
      *  fraction^^exponent.
      *
      *  @param fraction The fraction elapsed of the easing in phase
      *  of the animation, between 0.0 and 1.0.
-     *
+     *
      *  @return A value that represents the eased value for this
      *  phase of the animation.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -118,20 +118,20 @@
     {
         return Math.pow(fraction, _exponent);
     }
-
+
     /**
-     *  @private
-     *  Returns a value that represents the eased fraction during the
-     *  ease out phase of the animation.
-     *  The easing calculation for Power is equal to
+     *  @private
+     *  Returns a value that represents the eased fraction during the
+     *  ease out phase of the animation.
+     *  The easing calculation for Power is equal to
      *  1 - ((1-fraction)^^exponent).
      *
      *  @param fraction The fraction elapsed of the easing out phase
      *  of the animation, between 0.0 and 1.0.
-     *
+     *
      *  @return A value that represents the eased value for this
      *  phase of the animation.
-     *
+     *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
@@ -142,4 +142,4 @@
         return 1 - Math.pow((1 - fraction), _exponent);
     }
 }
-}+}


Make `process.argv` be [] when no arguments are given.

--- src/stdio/StandardProcess.as
+++ src/stdio/StandardProcess.as
@@ -85,11 +85,15 @@
     }

     public function get argv(): Array {
-      return env["stdio.argv"].split(" ").map(
-        function (argument: String, ...rest: Array): String {
-          return decodeURIComponent(argument)
-        }
-      )
+      if (env["stdio.argv"] === "") {
+        return []
+      } else {
+        return env["stdio.argv"].split(" ").map(
+          function (argument: String, ...rest: Array): String {
+            return decodeURIComponent(argument)
+          }
+        )
+      }
     }

     public function puts(value: *): void {


Name XMLNode's properties before XML's in trace_properties.as

--- test/trace/trace_properties.as
+++ test/trace/trace_properties.as
@@ -418,7 +418,9 @@
 {
   _global["mySecretId"] = "_global";
   _global.Object["mySecretId"] = "_global.Object";
+  _global.XMLNode["mySecretId"] = "_global.XMLNode";
   generate_names (_global.Object, "_global", "Object");
+  generate_names (_global.XMLNode, "_global", "XMLNode");
   generate_names (_global, "", "_global");

   if (typeof (o) == "object" || typeof (o) == "function")


wrap live code behing flag

wrap live code behing flag

--- src/main/actionscript/com/castlabs/dash/descriptors/index/SegmentTimeline.as
+++ src/main/actionscript/com/castlabs/dash/descriptors/index/SegmentTimeline.as
@@ -22,8 +22,10 @@
         super(representation);

         _live = traverseAndBuildLive(representation);
-        _minBufferTime = traverseAndBuildMinBufferTime(representation);
-        _timeShiftBuffer = traverseAndBuildTimeShiftBufferDepth(representation);
+        if (_live) {
+            _minBufferTime = traverseAndBuildMinBufferTime(representation);
+            _timeShiftBuffer = traverseAndBuildTimeShiftBufferDepth(representation);
+        }

         update(representation);
     }
@@ -79,7 +81,10 @@
     }

     public override function update(xml:XML):void {
-        removeOutdatedSegments();
+        if (_live) {
+            removeOutdatedSegments();
+        }
+
         appendNewSegments(xml);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 15923
Author:   chaase@adobe.com
Date:     2010-05-06T18:05:24.751600Z

Log Message:
-----------
Initial checkin of "Transition Interruption" feature. Set Transition.interruptionBehavior="stop" to get the new behavior, where interrupting transitions start from where the previous transition is at, rather than end()'ing the previous transition first. The default behavior is the same as it always was; transitionBehavior="end" is the default property, and that uses the previous behavior of ending the previous Transition.
New API: Transition.interruptionBehavior, mx.states.InterruptionBehavior

QE notes: Check out the spec for the details on the new API
Doc notes: none
Bugs: none
Reviewer: Jason
Tests run: checkintests, Mustella (mx/effects, spark/effects)
Is noteworthy for integration: Yes - feature requested by downstream teams

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/Transition.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/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/InterruptionBehavior.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/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/framework/src/mx/effects/CompositeEffect.as
+++ frameworks/projects/framework/src/mx/effects/CompositeEffect.as
@@ -428,6 +428,21 @@
         }
     }

+    /**
+     * @private
+     * Override this property so that we can set it on all child effects
+     */
+    override mx_internal function set transitionInterruption(value:Boolean):void
+    {
+        super.transitionInterruption = value;
+
+        var n:int = children.length;
+        for (var i:int = 0; i < n; i++)
+        {
+            var child:Effect = children[i];
+            child.transitionInterruption = value;
+        }
+    }
     //--------------------------------------------------------------------------
     //
     //  Methods


Transferred from the Adobe Open Source Subversion Repository

Revision: 19344
Author:   egeorgie@adobe.com
Date:     2010-12-14T00:38:13.222484Z

Log Message:
-----------
PARB changes for density scaling

- authorDensity -> applicationDPI, type changed to int
- DensityUtil not visible in the documentation anymore [ExcludeClass]
- DensityUtil. screenDPIToDeviceDensity() -> classifyDPI(), returns int now
- DensityUtil. getDensityScale() -> getDPIScale(), takes int now
- DeviceDensity enum -> DPIClassification enum
- ISystemManager.densityScale property has been removed.
- New property to Application -> runtimeDPI.

QE notes: can start writing automated tests now
Doc notes:
Bugs:
Reviewer: Alex, Glenn, Jason SJ,
Tests run: checkintest
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/DensityUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeviceDensity.as" copyfrom-rev="19256" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DPIClassification.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationAngledButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeviceDensity.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/framework/src/mx/managers/ISystemManager.as
+++ frameworks/projects/framework/src/mx/managers/ISystemManager.as
@@ -112,24 +112,6 @@
 	function get cursorChildren():IChildList;

     //----------------------------------
-    //  densityScale
-    //----------------------------------
-
-    /**
-     *  The density scale factor of the application.
-     *
-     *  When density scaling is enabled, Flex applies a scale factor based on
-     *  the application author density and the density of the current device
-     *  that Flex is running on.
-     *
-     *  Returns 1.0 when there is no scaling.
-     *
-     *  @see spark.components.Application#authorDensity
-     *  @see mx.core.DensityUtil
-     */
-    function get densityScale():Number;
-
-    //----------------------------------
     //  document
     //----------------------------------


- change: Implemented ComboBox#selectItemWithValue

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@835 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/controls/ComboBox.as
+++ src/reprise/controls/ComboBox.as
@@ -66,6 +66,12 @@
 		public function setSelectedIndex(index : int) : void
 		{
 			m_list.setSelectedIndex(index);
+			updateLabel();
+		}
+
+		public function selectItemWithValue(value : *) : void
+		{
+			m_list.selectItemWithValue(value);
 			updateLabel();
 		}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.components.supportClasses
 {


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

--- frameworks/projects/mx/src/mx/controls/VideoDisplay.as
+++ frameworks/projects/mx/src/mx/controls/VideoDisplay.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 18712
Author:   hmuller@adobe.com
Date:     2010-11-18T19:23:06.057683Z

Log Message:
-----------
Updated TBD items for GridLayout, GridColumnHeaderGroupLayout

API changes (most of *these were supposed have been included in SVN 18691):

- Added IGridItemRenderer/get columnIndex(), get grid()

- *Added DataGrid,Grid/invalidateCell()

- *Added GridItemRenderer/get columnIndex()

- *Renamed the following protected Grid methods:
grid_RollOverHandler() => grid_rollOverHandler()
grid_RollOutHandler() => grid_rollOutHandler()
grid_MouseUpHandler() => grid_mouseUpHandler()
grid_MouseDownHandler() => grid_mouseDownHandler()

QE notes:
Doc notes:
Bugs:
Reviewer: Kevin
Tests run: checkin, mustella
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridColumnHeaderGroupLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -3225,7 +3225,7 @@
         if (!dataProvider || (rowIndex < 0) || (rowIndex >= dataProvider.length))
             return;

-        // Provisional implementation: invalidate the entire row
+        // TODO (hmuller) this is a provisional implementation: invalidate the entire row
         const column:GridColumn = getGridColumn(columnIndex);
         const dataField:String = (column) ? column.dataField : null;
         dataProvider.itemUpdated(dataProvider.getItemAt(rowIndex), dataField);


Transferred from the Adobe Open Source Subversion Repository

Revision: 8535
Author:   chaase@adobe.com
Date:     2009-07-13T23:23:47.722512Z

Log Message:
-----------
Fixed some transform effects bugs plus a GraphicElement.localToGlobal() bug with the shared display object.

QE Notes: 8 failures in transform effects tests, 1 in Resize test, require changes to the test (new, correct behavior causes a change in the relevantStyles and affectedProperties return values)
Doc Notes: None
Bugs: sdk-21875, sdk-21465, sdk-21804, sdk-22165, sdk-21933
Reviewer: Jason, Glenn (for 21933)
Tests: checkintests, Mustella (spark/effects, mx/effects), Catalyst transition test

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.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/animation/Animation.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/Rotate3D.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/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>

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


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

--- frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/MXAdvancedDataGridItemRenderer.as
+++ frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/MXAdvancedDataGridItemRenderer.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Able to pick non enabled UI-elements as well.

--- Bin/Data/Scripts/Editor/EditorView.as
+++ Bin/Data/Scripts/Editor/EditorView.as
@@ -388,7 +388,7 @@
         return;

     IntVector2 pos = ui.cursorPosition;
-    UIElement@ elementAtPos = ui.GetElementAt(pos);
+    UIElement@ elementAtPos = ui.GetElementAt(pos, pickMode != PICK_UI_ELEMENTS);
     if (pickMode == PICK_UI_ELEMENTS)
     {
         bool leftClick = mouseClick && input.mouseButtonPress[MOUSEB_LEFT];
@@ -397,7 +397,7 @@
         if (elementAtPos !is null)
         {
             // Only interested in user-created UI elements
-            if (elementAtPos.GetElementEventSender() is editorUIElement)
+            if (elementAtPos !is editorUIElement && elementAtPos.GetElementEventSender() is editorUIElement)
             {
                 // \todo Debug draw the UIElement
                 //DebugDrawUIElement();


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

--- frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemDataGridNameColumnRenderer.as
+++ frameworks/projects/airframework/src/mx/controls/fileSystemClasses/FileSystemDataGridNameColumnRenderer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-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.
 //
 ////////////////////////////////////////////////////////////////////////////////


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

--- frameworks/projects/automation_air/src/mx/automation/air/AirFunctionsHelper.as
+++ frameworks/projects/automation_air/src/mx/automation/air/AirFunctionsHelper.as
@@ -44,7 +44,7 @@
 			{
 				var automationManager:IAutomationManager2 = Automation.automationManager2;
 				if(automationManager)
-					_appWindow = automationManager.getAirWindow(windowId);
+					_appWindow = automationManager.getAIRWindow(windowId);
 			}
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 11811
Author:   dsubrama@adobe.com
Date:     2009-11-14T20:14:54.284449Z

Log Message:
-----------
Fixes for FXG 2.0.

SDK-23790 - We now set the blendMode correctly when switching from an AIM blendMode to a native Flash one.

SDK-24039 - We hoisted the AIM blendMode support up to UIComponent as per Catalyst's request.

SDK-23715 - Positioning of radial gradient strokes is now correct.

As part of this change, the spark.primitives.supportClasses.shaders packaged move into the framework swc/project, specifically mx.graphics.shaderClasses.

QE notes: Regression and re-gening of so many bitmaps.
Doc notes: None
Bugs: SDK-23790, SDK-24039, SDK-23715
Reviewer: Jason/Evtim/Pete
Tests run: Checkintests - known failures with bitmaps
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/shaders</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskFilter.pbk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodgeShader.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/HueShader.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLight.pbj</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLight.pbk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorBurn.pbj</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorBurn.pbk</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ExclusionShaderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ColorShaderExample.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/HueShaderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/FilledElement.as</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/primitives/supportClasses</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SoftLightShader.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorBurnShader.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/SaturationShaderExample.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Saturation.pbj</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Saturation.pbk</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/SoftLightShaderExample.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ks5792.jpg</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ColorBurnShaderExample.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskShader.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/SaturationShader.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Exclusion.pbj</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Exclusion.pbk</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/LuminosityShaderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Luminosity.pbj</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Luminosity.pbk</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Color.pbj</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Color.pbk</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/ColorDodgeShaderExample.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Hue.pbj</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodge.pbj</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/Hue.pbk</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodge.pbk</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/asdoc/en_US/mx/graphics/shaderClasses/examples/LuminosityMaskShaderExample.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ExclusionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/StrokedElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/LuminosityMaskFilter.pbj</path>

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

--- frameworks/projects/framework/src/mx/graphics/shaderClasses/ExclusionShader.as
+++ frameworks/projects/framework/src/mx/graphics/shaderClasses/ExclusionShader.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.graphics.shaderClasses
+{
+import flash.display.Shader;
+
+/**
+ *  The ExclusionShader class creates a blend shader that is equivalent to
+ *  the 'Exclusion' blend mode for RGB premultiplied colors available
+ *  in Adobe Creative Suite tools. This blend mode is not native to Flash,
+ *  but is available in tools like Adobe Illustrator and Adobe Photoshop.
+ *
+ *  The 'exclusion' blend mode can be set on Flex groups and graphic
+ *  elements and the visual appearance in tools like Adobe Illustrator and
+ *  Adobe Photoshop will be mimicked through this blend shader.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ *
+ *  @includeExample examples/ExclusionShaderExample.mxml
+ */
+public class ExclusionShader extends flash.display.Shader
+{
+    [Embed(source="Exclusion.pbj", mimeType="application/octet-stream")]
+    private static var ShaderClass:Class;
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function ExclusionShader()
+    {
+        super(new ShaderClass());
+    }
+
+}
+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.listClasses
 {


fixing param names + documentation in lerp2d

--- raw/src/org/yellcorp/lib/core/InterpUtil.as
+++ raw/src/org/yellcorp/lib/core/InterpUtil.as
@@ -66,23 +66,23 @@
     /**
      * Linearly interpolates a value in two dimensions.
      *
-     * @param v00 The value at (0, 0).
-     * @param v01 The value at (0, 1).
-     * @param v10 The value at (1, 0).
-     * @param v11 The value at (1, 1).
+     * @param v00 The value at x=0, y=0.
+     * @param v10 The value at x=1, y=0.
+     * @param v01 The value at x=0, y=1.
+     * @param v11 The value at x=1, y=1.
      * @param x   X interpolant.
      * @param y   Y interpolant.
      *
      * @return   The interpolated value.
      */
-    public static function lerp2d(v00:Number, v01:Number,
-                                  v10:Number, v11:Number,
+    public static function lerp2d(v00:Number, v10:Number,
+                                  v01:Number, v11:Number,
                                   x:Number, y:Number):Number
     {
-        var v0x:Number = v00 + x * (v01 - v00);
-        var v1x:Number = v10 + x * (v11 - v10);
+        var vx0:Number = v00 + x * (v10 - v00);
+        var vx1:Number = v01 + x * (v11 - v01);

-        return v0x + y * (v1x - v0x);
+        return vx0 + y * (vx1 - vx0);
     }

     /**


344 whitespace stripper needs a /g flag

344 whitespace stripper needs a /g flag

--- raw/src/org/yellcorp/lib/core/StringUtil.as
+++ raw/src/org/yellcorp/lib/core/StringUtil.as
@@ -2,7 +2,7 @@
 {
 public class StringUtil
 {
-    public static const WHITESPACE:RegExp = /[\s\0]+/;
+    public static const WHITESPACE:RegExp = /[\s\0]+/g;
     public static const LEADING_WHITESPACE:RegExp = /^[\s\0]+/;
     public static const TRAILING_WHITESPACE:RegExp = /[\s\0]+$/;
     public static const ENTIRELY_WHITESPACE:RegExp = /^[\s\0]+$/;


Transferred from the Adobe Open Source Subversion Repository

Revision: 1362
Author:   jimurphy@adobe.com
Date:     2008-04-23T20:46:55.527546Z

Log Message:
-----------
merge 3.0.x [1338,1346] -> trunk

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

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

--- frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as
+++ frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as
@@ -51,15 +51,15 @@
     //--------------------------------------------------------------------------
     //
     // Constructor
-    //
+    //
     //--------------------------------------------------------------------------

     /**
      *  Constructs a Consumer.
-     *
-     *
+     *
+     *
      *  @example
-     *  <listing version="3.0">
+     *  <listing version="3.0">
      *   function initConsumer():void
      *   {
      *       var consumer:Consumer = new Consumer();
@@ -83,19 +83,19 @@
 	    _log = Log.getLogger("mx.messaging.Consumer");
 		_agentType = "consumer";
 	}
-
+
     //--------------------------------------------------------------------------
     //
     // Variables
-    //
+    //
     //--------------------------------------------------------------------------

     /**
      *  @private
      *  This is the current number of resubscribe attempts that we've done.
      */
-    private var _currentAttempt:int;
-
+    private var _currentAttempt:int;
+
     /**
      *  @private
      *  The timer used for resubscribe attempts.
@@ -111,7 +111,7 @@
      *  @private
      *  Current subscribe message - used for resubscribe attempts.
      */
-    private var _subscribeMsg:CommandMessage;
+    private var _subscribeMsg:CommandMessage;

     /**
      *  @private
@@ -122,7 +122,7 @@
     //--------------------------------------------------------------------------
     //
     // Properties
-    //
+    //
     //--------------------------------------------------------------------------

 	//----------------------------------
@@ -132,9 +132,9 @@
     /**
      *  @private
      *  If our clientId has changed we may need to unsubscribe() using the
-     *  current clientId and then resubscribe using the new clientId.
+     *  current clientId and then resubscribe using the new clientId.
      *  // TODO - remove this?
-     *
+     *
      *  @param value The clientId value.
      */
 	override mx_internal function setClientId(value:String):void
@@ -147,9 +147,9 @@
 				unsubscribe();
 				resetSubscription = true;
 		    }
-
+
 			super.setClientId(value);
-
+
 			if (resetSubscription)
 				subscribe(value);
 		}
@@ -158,11 +158,11 @@
 	//----------------------------------
 	//  destination
 	//----------------------------------
-
+
     /**
      *  @private
      *  Updates the destination for this Consumer and resubscribes if the
-     *  Consumer is currently subscribed.
+     *  Consumer is currently subscribed.
      */
 	override public function set destination(value:String):void
 	{
@@ -174,17 +174,17 @@
                 unsubscribe();
                 resetSubscription = true;
             }
-
+
             super.destination = value;
-
+
             if (resetSubscription)
                 subscribe();
-        }
+        }
 	}

 	//----------------------------------
 	//  resubscribeAttempts
-	//----------------------------------
+	//----------------------------------

     /**
      *  @private
@@ -195,25 +195,25 @@

 	/**
 	 *  The number of resubscribe attempts that the Consumer makes in the event
-	 *  that the destination is unavailable or the connection to the destination fails.
+	 *  that the destination is unavailable or the connection to the destination fails.
 	 *  A value of -1 enables infinite attempts.
 	 *  A value of zero disables resubscribe attempts.
 	 *

 	 *  Resubscribe attempts are made at a constant rate according to the resubscribe interval
 	 *  value. When a resubscribe attempt is made if the underlying channel for the Consumer is not
-	 *  connected or attempting to connect the channel will start a connect attempt.
+	 *  connected or attempting to connect the channel will start a connect attempt.
 	 *  Subsequent Consumer resubscribe attempts that occur while the underlying
 	 *  channel connect attempt is outstanding are effectively ignored until
-	 *  the outstanding channel connect attempt succeeds or fails.
+	 *  the outstanding channel connect attempt succeeds or fails.
 	 *

-	 *
+	 *
 	 *  @see mx.messaging.Consumer#resubscribeInterval
 	 */
 	public function get resubscribeAttempts():int
 	{
 	    return _resubscribeAttempts;
 	}
-
+
 	/**
 	 *  @private
 	 */
@@ -223,16 +223,16 @@
 	    {
 	        if (value == 0)
 	            stopResubscribeTimer();
-
+
 	        var event:PropertyChangeEvent = PropertyChangeEvent.createUpdateEvent(this, "resubscribeAttempts", _resubscribeAttempts, value);
 	        _resubscribeAttempts = value;
-	        dispatchEvent(event);
-	    }
+	        dispatchEvent(event);
+	    }
 	}

 	//----------------------------------
 	//  resubscribeInterval
-	//----------------------------------
+	//----------------------------------

     /**
      *  @private
@@ -244,27 +244,27 @@
 	/**
 	 *  The number of milliseconds between resubscribe attempts.
 	 *  If a Consumer doesn't receive an acknowledgement for a subscription
-	 *  request, it will wait the specified number of milliseconds before
-	 *  attempting to resubscribe.
+	 *  request, it will wait the specified number of milliseconds before
+	 *  attempting to resubscribe.
 	 *  Setting the value to zero disables resubscriptions.
 	 *

 	 *  Resubscribe attempts are made at a constant rate according to this
 	 *  value. When a resubscribe attempt is made if the underlying channel for the Consumer is not
-	 *  connected or attempting to connect the channel will start a connect attempt.
+	 *  connected or attempting to connect the channel will start a connect attempt.
 	 *  Subsequent Consumer resubscribe attempts that occur while the underlying
 	 *  channel connect attempt is outstanding are effectively ignored until
-	 *  the outstanding channel connect attempt succeeds or fails.
+	 *  the outstanding channel connect attempt succeeds or fails.
 	 *

-	 *
+	 *
 	 *  @see mx.messaging.Consumer#resubscribeInterval
-	 *
+	 *
 	 *  @throws ArgumentError If the assigned value is negative.
 	 */
 	public function get resubscribeInterval():int
 	{
 	    return _resubscribeInterval;
-	}
-
+	}
+
 	/**
 	 *  @private
 	 */
@@ -280,13 +280,13 @@
 			}
 		    else if (value == 0)
 			{
-		        stopResubscribeTimer();
-			}
+		        stopResubscribeTimer();
+			}
 		    else if (_resubscribeTimer != null)
 			{
 		        _resubscribeTimer.delay = value;
 			}
-
+
 		    var event:PropertyChangeEvent = PropertyChangeEvent.createUpdateEvent(this, "resubscribeInterval", _resubscribeInterval, value);
 		    _resubscribeInterval = value;
 		    dispatchEvent(event);
@@ -295,15 +295,15 @@

 	//----------------------------------
 	//  subscribed
-	//----------------------------------
-
-	/**
-	 *  @private
-	 */
-	private var _subscribed:Boolean;
-
+	//----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _subscribed:Boolean;
+
 	[Bindable(event="propertyChange")]
-
+
 	/**
 	 *  Indicates whether the Consumer is currently subscribed. The propertyChange
 	 *  event is dispatched when this property changes.
@@ -312,7 +312,7 @@
 	{
 		return _subscribed;
 	}
-
+
 	/**
 	 *  @private
 	 */
@@ -338,14 +338,14 @@
                 if (channelSet != null && channelSet.currentChannel != null && channelSet.currentChannel is PollingChannel)
                     PollingChannel(channelSet.currentChannel).disablePolling();
             }
-
-	        dispatchEvent(event);
+
+	        dispatchEvent(event);
 	    }
 	}

 	//----------------------------------
 	//  timestamp
-	//----------------------------------
+	//----------------------------------

 	/**
 	 *  @private
@@ -355,21 +355,21 @@
     [Bindable(event="propertyChange")]

 	/**
-	 *  Contains the timestamp of the most recent message this Consumer
+	 *  Contains the timestamp of the most recent message this Consumer
 	 *  has received.
 	 *  This value is passed to the destination in a receive() call
 	 *  to request that it deliver messages for the Consumer from the timestamp
 	 *  forward.
-	 *  All messages with a timestamp value greater than the
+	 *  All messages with a timestamp value greater than the
 	 *  timestamp value will be returned during a poll operation.
-	 *  Setting this value to -1 will retrieve all cached messages from the
+	 *  Setting this value to -1 will retrieve all cached messages from the
 	 *  destination.
 	 */
 	public function get timestamp():Number
 	{
 	    return _timestamp;
 	}
-
+
 	/**
 	 *  @private
 	 */
@@ -380,33 +380,33 @@
 	        var event:PropertyChangeEvent = PropertyChangeEvent.createUpdateEvent(this, "timestamp", _timestamp, value);
 	        _timestamp = value;
 	        dispatchEvent(event);
-	    }
+	    }
 	}

     //--------------------------------------------------------------------------
     //
     // Overridden Methods
-    //
+    //
     //--------------------------------------------------------------------------

 	/**
 	 *  @private
      *  Custom processing for subscribe, unsubscribe and poll message
-     *  acknowledgments.
-     *
+     *  acknowledgments.
+     *
      *  @param ackMsg The AcknowledgeMessage.
-     *
+     *
      *  @param msg The original subscribe, unsubscribe or poll message.
 	 */
 	override public function acknowledge(ackMsg:AcknowledgeMessage, msg:IMessage):void
-	{
+	{
 	    // Ignore acks for any outstanding messages that return after disconnect() is invoked.
 	    if (_disconnectBarrier)
 	        return;

 	    // Only run Consumer processing if this isn't an error.
 	    if (!ackMsg.headers[AcknowledgeMessage.ERROR_HINT_HEADER] && (msg is CommandMessage))
-	    {
+	    {
 	        var command:CommandMessage = msg as CommandMessage;

             var op:int = command.operation;
@@ -414,50 +414,50 @@
             // For MultiTopicConsumers, the message gets marked if this is the
             // message completely unsubscribes the client.
             if (op == CommandMessage.MULTI_SUBSCRIBE_OPERATION)
-            {
+            {
                 if (msg.headers.DSlastUnsub != null)
                    op = CommandMessage.UNSUBSCRIBE_OPERATION;
                 else
                    op = CommandMessage.SUBSCRIBE_OPERATION;
             }
-
+
 	        switch (op)
 	        {
 	            case CommandMessage.UNSUBSCRIBE_OPERATION:
                     if (Log.isInfo())
-                        _log.info("'{0}' {1} acknowledge for unsubscribe.", id, _agentType);
+                        _log.info("'{0}' {1} acknowledge for unsubscribe.", id, _agentType);
                     super.setClientId(null);
                     setSubscribed(false); // Stop listening for messages.
                     ackMsg.clientId = null; // Force the ack's clientId to null as well before ack'ing it.
-                    super.acknowledge(ackMsg, msg);
+                    super.acknowledge(ackMsg, msg);
                 break;
-
+
                 case CommandMessage.SUBSCRIBE_OPERATION:
                     stopResubscribeTimer();
-                    // NOTE: the -1 in the timestamp assignment below.
+                    // NOTE: the -1 in the timestamp assignment below.
                     // This works around a bug where if a Producer sends
                     // a message in the same batch as the subscribe,
                     // it will end up with (likely) the same timestamp
                     // as the consumer.  Because the message is sent
                     // by the client after the subscribe though, it
                     // should still be delivered.
-                    // TODO: Improve solution here.
+                    // TODO: Improve solution here.
                     if (ackMsg.timestamp > _timestamp)
                         _timestamp = ackMsg.timestamp - 1;

                     if (Log.isInfo())
-                        _log.info("'{0}' {1} acknowledge for subscribe. Client id '{2}' new timestamp {3}",
-                                    id, _agentType, ackMsg.clientId, _timestamp);
+                        _log.info("'{0}' {1} acknowledge for subscribe. Client id '{2}' new timestamp {3}",
+                                    id, _agentType, ackMsg.clientId, _timestamp);
                     super.setClientId(ackMsg.clientId);
                     setSubscribed(true);
                     super.acknowledge(ackMsg, msg);
                 break;
-
+
                 // Handle the result of a receive() invocation (a Consumer instance-specific poll request).
-                case CommandMessage.POLL_OPERATION:
+                case CommandMessage.POLL_OPERATION:
                 	if ((ackMsg.body != null) && (ackMsg.body is Array))
                 	{
-			            var messageList:Array = ackMsg.body as Array;
+			            var messageList:Array = ackMsg.body as Array;
                         for each (var message:IMessage in messageList)
                             messageHandler(MessageEvent.createEvent(MessageEvent.MESSAGE, message));
 		            }
@@ -468,38 +468,38 @@
 	    else
 	    {
 	        super.acknowledge(ackMsg, msg);
-	    }
-	}
-
+	    }
+	}
+
 	/**
 	 *  Disconnects the Consumer from its remote destination.
-	 *  This method should be invoked on a Consumer that is no longer
+	 *  This method should be invoked on a Consumer that is no longer
 	 *  needed by an application after unsubscribing.
 	 *  This method does not wait for outstanding network operations to complete
 	 *  and does not send an unsubscribe message to the server.
 	 *  After invoking disconnect(), the Consumer will report that it is in an
-	 *  disconnected, unsubscribed state because it will not receive any more
+	 *  disconnected, unsubscribed state because it will not receive any more
 	 *  messages until it has reconnected and resubscribed.
 	 *  Disconnecting stops automatic resubscription attempts if they are running.
 	 */
 	override public function disconnect():void
 	{
-	    // We don't invoke unsubscribe() in this case because a Consumer subscribed to a
-	    // JMS destination durably will blow away the durable subscription.
-	    _shouldBeSubscribed = false; // Prevent resubscribe attempts.
-        stopResubscribeTimer();
-        setSubscribed(false);
-
+	    // We don't invoke unsubscribe() in this case because a Consumer subscribed to a
+	    // JMS destination durably will blow away the durable subscription.
+	    _shouldBeSubscribed = false; // Prevent resubscribe attempts.
+        stopResubscribeTimer();
+        setSubscribed(false);
+
         super.disconnect();
-	}
-
-	/**
-	 *  @private
-     *  The Consumer supresses ErrorMessage processing if the error is
+	}
+
+	/**
+	 *  @private
+     *  The Consumer supresses ErrorMessage processing if the error is
      *  retryable and it is configured to resubscribe.
-     *
+     *
      *  @param errMsg The ErrorMessage describing the fault.
-     *
+     *
      *  @param msg The original message (generally a subscribe).
 	 */
 	override public function fault(errMsg:ErrorMessage, msg:IMessage):void
@@ -523,60 +523,80 @@
             super.fault(errMsg, msg);
         }
     }
-
+
+    /**
+     *  @private
+     *  Custom processing to warn the user if the consumer is connected over
+     *  a non-real channel.
+     *
+     *  @param event The ChannelEvent.
+     */
+    override public function channelConnectHandler(event:ChannelEvent):void
+    {
+        super.channelConnectHandler(event);
+
+        if (connected && channelSet != null && channelSet.currentChannel != null
+                && !channelSet.currentChannel.realtime && Log.isWarn())
+        {
+            _log.warn("'{0}' {1} connected over a non-realtime channel '{2}'"
+                + " which means channel is not automatically receiving updates via polling or server push."
+                , id, _agentType, channelSet.currentChannel.id);
+        }
+    }
+
     /**
      *  @private
      *  Custom processing to start up a resubscribe timer if our channel is
      *  disconnected when we should be subscribed.
-     *
+     *
      *  @param event The ChannelEvent.
      */
     override public function channelDisconnectHandler(event:ChannelEvent):void
 	{
 	    setSubscribed(false);
-
+
 	    super.channelDisconnectHandler(event);
-
+
 	    if (_shouldBeSubscribed && !event.rejected)
             startResubscribeTimer();
-	}
+	}

 	/**
 	 *  @private
 	 *  Custom processing to start up a resubscribe timer if our channel faults
 	 *  when we should be subscribed.
-	 *
+	 *
 	 *  @param event The ChannelFaultEvent.
 	 */
 	override public function channelFaultHandler(event:ChannelFaultEvent):void
 	{
 	    if (!event.channel.connected)
 	        setSubscribed(false);
-
+
 	    super.channelFaultHandler(event);
-
+
 	    if (_shouldBeSubscribed && !event.rejected && !event.channel.connected)
 	        startResubscribeTimer();
     }
-
+
     //--------------------------------------------------------------------------
     //
     // Methods
-    //
-    //--------------------------------------------------------------------------
-
+    //
+    //--------------------------------------------------------------------------
+
 	/**
 	 *  Requests any messages that are queued for this Consumer on the server.
 	 *  This method should only be used for Consumers that subscribe over non-realtime,
 	 *  non-polling channels.
 	 *  This method is a no-op if the Consumer is not subscribed.
-	 *
+	 *
 	 *  @param timestamp This argument is deprecated and is ignored.
 	 */
 	public function receive(timestamp:Number = 0):void
-	{
+	{
 	    if (clientId != null) // We need a clientId to distinguish this from a generic poll request sent by a polling channel.
-	    {
+	    {
     		var msg:CommandMessage = new CommandMessage();
             msg.operation = CommandMessage.POLL_OPERATION;
             msg.destination = destination;
@@ -586,44 +606,44 @@

 	/**
      *  Subscribes to the remote destination.
-	 *
-	 *  @param clientId The client id to subscribe with. Use null for non-durable Consumers. If the subscription is durable, a consistent
+	 *
+	 *  @param clientId The client id to subscribe with. Use null for non-durable Consumers. If the subscription is durable, a consistent
 	 *                  value must be supplied every time the Consumer subscribes in order
 	 *                  to reconnect to the correct durable subscription in the remote destination.
-	 *
+	 *
 	 *  @throws mx.messaging.errors.InvalidDestinationError If no destination is set.
 	 */
 	public function subscribe(clientId:String = null):void
 	{
         // Set a flag to determine whether the passed clientId differs from the
         // current value and should be assigned.
-        var resetClientId:Boolean = ((clientId != null) &&
+        var resetClientId:Boolean = ((clientId != null) &&
                                 (super.clientId != clientId)) ? true : false;
-
+
         if (subscribed && resetClientId)
         {
             // We're already subscribed, but we need to resubscribe under
             // the new clientId.
             unsubscribe();
         }
-
+
         // Make sure any resubscribe timer is stopped.
         stopResubscribeTimer();
-
+
         _shouldBeSubscribed = true;
         if (resetClientId)
             super.setClientId(clientId);
         if (Log.isInfo())
             _log.info("'{0}' {1} subscribe.", id, _agentType);
         _subscribeMsg = buildSubscribeMessage();
-
+
         internalSend(_subscribeMsg);
 	}

 	/**
      *  Unsubscribes from the remote destination. In the case of durable JMS
      *  subscriptions, this will destroy the durable subscription on the JMS server.
-     *
+     *
      *  @param preserveDurable - when true, durable JMS subscriptions are not destroyed
 	 * 		allowing consumers to later resubscribe and receive missed messages
 	 */
@@ -632,12 +652,12 @@
         _shouldBeSubscribed = false;
         if (subscribed)
         {
-        	// Stop listening now for any messages as we could be set to a new
-        	// channel before the ack comes back, and once the ack returns we
+        	// Stop listening now for any messages as we could be set to a new
+        	// channel before the ack comes back, and once the ack returns we
         	// will no longer have a valid client id.
             if (channelSet != null)
 		        channelSet.removeEventListener(destination, messageHandler);
-
+
 		    if (Log.isInfo())
                 _log.info("'{0}' {1} unsubscribe.", id, _agentType);

@@ -652,15 +672,15 @@
     //--------------------------------------------------------------------------
     //
     // Internal Methods
-    //
-    //--------------------------------------------------------------------------
-
+    //
+    //--------------------------------------------------------------------------
+
     /**
 	 *  @private
 	 *  Consumers subscribe for messages from a destination and this is the handler
 	 *  method that is invoked when a message for this Consumer is pushed or polled
 	 *  from the server.
-	 *
+	 *
 	 *  @param event The MessageEvent.
 	 */
 	mx_internal function messageHandler(event:MessageEvent):void
@@ -668,10 +688,10 @@
 	    // NOTE: This method is invoked directly by the ConsumerMessageDispatcher.
 	    // The event flow for a pushed message is:
 	    // 1. Channel receives a pushed/polled message and dispatches a message event
-	    // 2. Any ChannelSets connected to the Channel will handle these events in ChannelSet.messageHandler();
+	    // 2. Any ChannelSets connected to the Channel will handle these events in ChannelSet.messageHandler();
 	    //    simply redispatching them.
-	    // 3. Consumers that subscribe to a destination trigger the internal use of a shared ConsumerMessageDispatcher
-	    //    that listens for message events from any ChannelSets that Consumers have subscribed over and this helper routes pushed messages to the proper Consumer instances.
+	    // 3. Consumers that subscribe to a destination trigger the internal use of a shared ConsumerMessageDispatcher
+	    //    that listens for message events from any ChannelSets that Consumers have subscribed over and this helper routes pushed messages to the proper Consumer instances.
 	    var message:IMessage = event.message;
 	    if (message is CommandMessage)
         {
@@ -683,19 +703,19 @@
                     // message this agent sent. If a polling channel is being used, let it know.
                     if (channelSet.currentChannel is PollingChannel)
                         PollingChannel(channelSet.currentChannel).disablePolling();
-                    setSubscribed(false);
+                    setSubscribed(false);
                 break;
                 default:
                     if (Log.isWarn())
                         _log.warn("'{0}' received a CommandMessage '{1}' that could not be handled.", id, CommandMessage.getOperationAsString(command.operation));
-            }
+            }
             /*
-             * Command messages are handled internally by the Consumer and
+             * Command messages are handled internally by the Consumer and
              * are not dispatched to message listeners via MessageEvents.
              */
-            return;
-        }
-
+            return;
+        }
+
         if (message.timestamp > _timestamp)
             _timestamp = message.timestamp;

@@ -704,20 +724,20 @@
 		if (message is ErrorMessage)
 			dispatchEvent(MessageFaultEvent.createEvent(ErrorMessage(message)));
 		else
-			dispatchEvent(MessageEvent.createEvent(MessageEvent.MESSAGE, message));
+			dispatchEvent(MessageEvent.createEvent(MessageEvent.MESSAGE, message));
 	}

     //--------------------------------------------------------------------------
     //
     // Protected Methods
-    //
+    //
     //--------------------------------------------------------------------------

 	/**
 	 *  Returns a subscribe message.
 	 *  This method should be overridden by subclasses if they need custom
 	 *  subscribe messages.
-	 *
+	 *
 	 *  @return The subscribe CommandMessage.
 	 */
 	protected function buildSubscribeMessage():CommandMessage
@@ -733,10 +753,10 @@
 	 *  Returns an unsubscribe message.
 	 *  This method should be overridden by subclasses if they need custom
 	 *  unsubscribe messages.
-	 *
+	 *
 	 *  @param preserveDurable - when true, durable JMS subscriptions are not destroyed
 	 * 			allowing consumers to later resubscribe and receive missed messages
-	 *
+	 *
 	 *  @return The unsubscribe CommandMessage.
 	 */
 	protected function buildUnsubscribeMessage(preserveDurable:Boolean):CommandMessage
@@ -745,26 +765,26 @@
         msg.operation = CommandMessage.UNSUBSCRIBE_OPERATION;
         msg.clientId = clientId;
         msg.destination = destination;
-
+
         // only include the PRESERVE_DURABLE_HEADER param in the message if
         // its value is true
         if (preserveDurable)
         	msg.headers[CommandMessage.PRESERVE_DURABLE_HEADER] = preserveDurable;
-
+
         return msg;
 	}

     /**
      *  @private
-     *  Attempt to resubscribe.
+     *  Attempt to resubscribe.
      *  This can be called directly or from a Timer's event handler.
-     *
+     *
      *  @param event The timer event for resubscribe attempts.
      */
     protected function resubscribe(event:TimerEvent):void
     {
         // If we're past our limit of attempts, fault out.
-        if ((_resubscribeAttempts != -1) &&
+        if ((_resubscribeAttempts != -1) &&
             (_currentAttempt >= _resubscribeAttempts))
         {
             stopResubscribeTimer();
@@ -779,21 +799,21 @@
             fault(errMsg, _subscribeMsg);
             return;
         }
-
+
         if (Log.isDebug())
             _log.debug("'{0}' {1} trying to resubscribe.", id, _agentType);
-
+
         _resubscribeTimer.delay = _resubscribeInterval;
         _currentAttempt++;
-        // Send the resubscribe message, skipping the MessageAgent's queue that blocks
+        // Send the resubscribe message, skipping the MessageAgent's queue that blocks
         // messages until the clientId is set.
         internalSend(_subscribeMsg, false);
-    }
-
-	/**
-	 *  @private
-     *  This method will start a timer which attempts to resubscribe
-     *  periodically.
+    }
+
+	/**
+	 *  @private
+     *  This method will start a timer which attempts to resubscribe
+     *  periodically.
      */
     protected function startResubscribeTimer():void
     {
@@ -804,8 +824,8 @@
             {
                 if (Log.isDebug())
                     _log.debug("'{0}' {1} starting resubscribe timer.", id, _agentType);
-	            /*
-	             * Initially, the timeout is set to 1 so we try to
+	            /*
+	             * Initially, the timeout is set to 1 so we try to
 	             * reconnect immediately (perhaps to a different channel).
 	             * after that, it will poll at the configured time interval.
 	             */
@@ -816,9 +836,9 @@
             }
         }
     }
-
-    /**
-     * @private
+
+    /**
+     * @private
      * Stops a resubscribe timer if one is running.
      */
     protected function stopResubscribeTimer():void
@@ -827,12 +847,12 @@
         {
             if (Log.isDebug())
                 _log.debug("'{0}' {1} stopping resubscribe timer.", id, _agentType);
-
+
             _resubscribeTimer.removeEventListener(TimerEvent.TIMER, resubscribe);
             _resubscribeTimer.reset();
             _resubscribeTimer = null;
         }
-	}
+	}
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 784
Author:   shodgson@adobe.com
Date:     2008-03-12T06:03:27.486454Z

Log Message:
-----------
Merge revision 755 from branches/3.0.x to trunk.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/CommandMessage.as</path>
<path kind="file" action="M">/flex/sdk/branches/3.0.x/frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as
+++ frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as
@@ -194,13 +194,13 @@
      *  that the destination is unavailable or the connection to the destination closes.
      *  A value of -1 enables infinite attempts.
      *  A value of zero disables reconnect attempts.
-     *
+     *
      *
Reconnect attempts are made at a constant rate according to the reconnect interval
      *  value. When a reconnect attempt is made if the underlying channel for the Producer is not
      *  connected or attempting to connect the channel will start a connect attempt.
      *  Subsequent Producer reconnect attempts that occur while the underlying
      *  channel connect attempt is outstanding are effectively ignored until
-     *  the outstanding channel connect attempt succeeds or fails.

+     *  the outstanding channel connect attempt succeeds or fails.

      *
      *  @see mx.messaging.Producer#reconnectInterval
      */
@@ -238,17 +238,17 @@

     /**
      *  The number of milliseconds between reconnect attempts.
-     *  If a Producer does not receive an acknowledgement for a connect
+     *  If a Producer doesn't receive an acknowledgement for a connect
      *  attempt, it will wait the specified number of milliseconds before
      *  making a subsequent reconnect attempt.
      *  Setting the value to zero disables reconnect attempts.
-     *
+     *
      *
Reconnect attempts are made at a constant rate according to this
      *  value. When a reconnect attempt is made if the underlying channel for the Producer is not
      *  connected or attempting to connect the channel will start a connect attempt.
      *  Subsequent Producer reconnect attempts that occur while the underlying
      *  channel connect attempt is outstanding are effectively ignored until
-     *  the outstanding channel connect attempt succeeds or fails.

+     *  the outstanding channel connect attempt succeeds or fails.

      *
      *  @see mx.messaging.Producer#reconnectInterval
      *
@@ -303,7 +303,7 @@
      *  @param msg The original message.
      */
     override public function acknowledge(ackMsg:AcknowledgeMessage, msg:IMessage):void
-    {
+    {
         // Ignore acks for any outstanding messages that return after disconnect() is invoked.
         if (_disconnectBarrier)
             return;
@@ -315,7 +315,7 @@

     /**
      *  @private
-     *  The Producer supresses ErrorMessage processing if the fault is for a connect
+     *  The Producer suppresses ErrorMessage processing if the fault is for a connect
      *  attempt that is being retried.
      *
      *  @param errMsg The ErrorMessage describing the fault.
@@ -340,7 +340,7 @@

         if (_shouldBeConnected && !event.rejected)
             startReconnectTimer();
-    }
+    }

     /**
      *  @private
@@ -360,7 +360,7 @@
     /**
      *  Disconnects the Producer from its remote destination.
      *  This method does not wait for outstanding network operations to complete.
-     *  After invoking the disconnect() method, the Producer reports that it is not
+     *  After invoking disconnect(), the Producer will report that it is not
      *  connected and it will not receive any outstanding message acknowledgements or faults.
      *  Disconnecting stops automatic reconnect attempts if they are running.
      */
@@ -371,7 +371,7 @@
         stopReconnectTimer();

         super.disconnect();
-    }
+    }

     //--------------------------------------------------------------------------
     //
@@ -383,21 +383,19 @@
      *  Connects the Producer to its target destination.
      *  When a connection is established the connected property will
      *  change to true and this property is bindable and generates
-     *  PropertyChangeEvent events.
-     *  The underlying CLIENT_PING_OPERATION CommandMessage that is sent will result
+     *  PropertyChangeEvents.
+     *  The underlying CLIENT_PING_OPERATION CommandMessage that is sent will result
      *  in an acknowledge or fault event depending upon its success.
      *
-     *
The following example uses this method:

-     *
+     *  @throws mx.messaging.errors.InvalidDestinationError  If no destination is set.
+     *
+     *  @example
      *

      *     var producer:Producer = new Producer();
      *     producer.destination = "TestTopic";
      *     producer.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, handleConnect);
      *     producer.connect();
      *

-     *
-     *  @throws mx.messaging.errors.InvalidDestinationError  If no destination is set.
-     *
      */
     public function connect():void
     {
@@ -407,8 +405,8 @@

             if (_connectMsg == null)
                 _connectMsg = buildConnectMessage();
-            internalSend(_connectMsg, false);
-        }
+            internalSend(_connectMsg, false);
+        }
     }

     //--------------------------------------------------------------------------
@@ -424,8 +422,11 @@
      *  message destination on the server has been configured to process the
      *  custom message type.
      *
-     *
The following example uses this method:

-     *
+     *  @param message The Message to send.
+     *
+     *  @throws mx.messaging.errors.InvalidDestinationError  If no destination is set.
+     *
+     *  @example
      *

      *     var producer:Producer = new Producer();
      *     producer.destination = "TestTopic";
@@ -434,9 +435,6 @@
      *     producer.send(msg);
      *

      *
-     *  @param message The message to send.
-     *
-     *  @throws mx.messaging.errors.InvalidDestinationError  If no destination is set.
      */
     public function send(message:IMessage):void
     {
@@ -480,7 +478,7 @@

     /**
      *  @private
-     *  The Producer supresses ErrorMessage processing if the fault is for a connect
+     *  The Producer suppresses ErrorMessage processing if the fault is for a connect
      *  attempt that is being retried.
      *
      *  @param errMsg The ErrorMessage describing the fault.
@@ -488,7 +486,7 @@
      *  @param msg The original message.
      *
      *  @param routeToStore currently not used.  Previously was a flag used to
-     *  indicate if the faulted message should be stored offline to retry.
+     *  indicate if the faulted message shoudl be stored offline to retry.
      *
      *  @param ignoreDisconnectBarrier If true the message is faulted regardless
      *  of whether disconnect() has been invoked. Generally a disconnect() will
@@ -529,7 +527,7 @@
         {
             super.fault(errMsg, msg);
         }
-    }
+    }

     //--------------------------------------------------------------------------
     //
@@ -565,7 +563,7 @@
             _connectMsg = buildConnectMessage();

         internalSend(_connectMsg, false);
-    }
+    }

     /**
      *  @private
@@ -644,7 +642,7 @@
     private function buildConnectMessage():CommandMessage
     {
         var msg:CommandMessage = new CommandMessage();
-        msg.operation = CommandMessage.CLIENT_PING_OPERATION;
+        msg.operation = CommandMessage.TRIGGER_CONNECT_OPERATION;
         msg.clientId = clientId;
         msg.destination = destination;
         return msg;