Transferred from the Adobe Open Source Subversion Repository

Revision: 11027
Author:   dloverin@adobe.com
Date:     2009-10-20T15:50:09.018295Z

Log Message:
-----------
Changes to enable using multiple style managers.

Multiple style managers are not the default yet. Can be enabled by compiling with -create-style-manager.

QE notes: None.
Doc notes: None.
Bugs:
Reviewer: Alex, Paul
Tests run: checkintests, all mustella
Is noteworthy for integration: Yes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceGenerator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/dragClasses/DragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexChangeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSMergedStyleDeclaration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java</path>

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

--- frameworks/projects/mx/src/mx/controls/DateField.as
+++ frameworks/projects/mx/src/mx/controls/DateField.as
@@ -2157,7 +2157,7 @@
                 if (dateChooserStyleName)
                 {
                     var styleDecl:CSSStyleDeclaration =
-                    styleManager.getStyleDeclaration("." + dateChooserStyleName);
+                    styleManager.getMergedStyleDeclaration("." + dateChooserStyleName);

                     if (styleDecl)
                     {
@@ -2369,7 +2369,7 @@
         if (dateChooserStyleName)
         {
             var styleDecl:CSSStyleDeclaration =
-            styleManager.getStyleDeclaration("." + dateChooserStyleName);
+            styleManager.getMergedStyleDeclaration("." + dateChooserStyleName);

             if (styleDecl)
                 _dropdown.styleDeclaration = styleDecl;


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

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

 package mx.events
 {


fixing indent

fixing indent

--- srcts/weavejs/plot/SpatialIndex.as
+++ srcts/weavejs/plot/SpatialIndex.as
@@ -36,25 +36,22 @@
 	import weave.primitives.KDTree;
 	import weave.primitives.SimpleGeometry;

-import weavejs.api.core.ICallbackCollection;
+	import weavejs.api.core.ICallbackCollection;

-import weavejs.api.core.ILinkableObject;
-import weavejs.api.data.IQualifiedKey;
-import weavejs.api.data.ISimpleGeometry;
-import weavejs.geom.BLGNode;
-import weavejs.geom.Bounds2D;
-import weavejs.geom.GeneralizedGeometry;
-import weavejs.geom.KDTree;
-import weavejs.geom.Point;
-import weavejs.geom.SimpleGeometry;
+	import weavejs.api.core.ILinkableObject;
+	import weavejs.api.data.IQualifiedKey;
+	import weavejs.api.data.ISimpleGeometry;
+	import weavejs.geom.BLGNode;
+	import weavejs.geom.Bounds2D;
+	import weavejs.geom.GeneralizedGeometry;
+	import weavejs.geom.KDTree;
+	import weavejs.geom.Point;
+	import weavejs.geom.SimpleGeometry;

-/**
+	/**
 	 * This class provides an interface to a collection of spatially indexed IShape objects.
 	 * This class will not detect changes to the shapes you add to the index.
 	 * If you change the bounds of the shapes, you will need to call SpatialIndex.createIndex().
-	 *
-	 * @author adufilie
-	 * @author kmonico
 	 */
 	public class SpatialIndex implements ILinkableObject
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 5309
Author:   gruehle@adobe.com
Date:     2009-03-13T21:54:51.752954Z

Log Message:
-----------
Add Spark style metadata to Halo components.

baseColor - added to:
 UIComponent
 ScrollControlBase

symbolColor - added to:
 CheckBox
 ComboBase
 Container
 DateChooser
 ScrollBar
 NumericStepper
 PopUpButton
 RadioButton
 ScrollControlBase

contentBackgroundColor - added to:
 ComboBase
 Container
 DateChooser
 NumericStepper
 ScrollControlBase
 TextInput

focusColor - added to:
 Button
 ComboBase
 Container
 DateChooser
 NumericStepper
 ScrollControlBase
 Slider
 TextInput

The remaining Spark styles - alternatingItemColors, rollOverColor, and selectionColor are already defined for the Halo components.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.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/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ComboBase.as
+++ frameworks/projects/mx/src/mx/controls/ComboBase.as
@@ -45,6 +45,43 @@

 use namespace mx_internal;
+
+/**
+ *  Color of the content area of the component.
+ *
+ *  @default 0xFFFFFF
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="contentBackgroundColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Color of focus ring when the component is in focus
+ *
+ *  @default 0x70B2EE
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="focusColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Color of any symbol of a component. Examples include the check mark of a CheckBox or
+ *  the arrow of a ScrollBar button.
+ *
+ *  @default 0x000000
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+[Style(name="symbolColor", type="uint", format="Color", inherit="yes")]

 /**
  *  Name of the class to use as the default skin for the background and border.


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

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

 package mx.containers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8615
Author:   dsubrama@adobe.com
Date:     2009-07-16T00:06:27.325362Z

Log Message:
-----------
Added in enumerations to Inspectable metadata for a bunch of properties.

Reviewer: Ryan
QA: Yes, regress
Doc: No
Checkintests: Pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.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/spark/src/spark/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/TileLayout.as
+++ frameworks/projects/spark/src/spark/layouts/TileLayout.as
@@ -452,7 +452,7 @@
     private var _horizontalAlign:String = HorizontalAlign.JUSTIFY;

     [Bindable("propertyChange")]
-    [Inspectable(category="General")]
+    [Inspectable(category="General", enumeration="left,center,right,justify")]

     /**
      *  Specifies how to align the elements within the cells in the horizontal direction.
@@ -496,7 +496,7 @@
     private var _verticalAlign:String = VerticalAlign.JUSTIFY;

     [Bindable("propertyChange")]
-    [Inspectable(category="General")]
+    [Inspectable(category="General", enumeration="top,middle,bottom,justify")]

     /**
      *  Specifies how to align the elements within the cells in the vertical direction.


Reduced timeout between subtitle level loads after testing

--- src/org/mangui/hls/loader/SubtitlesLevelLoader.as
+++ src/org/mangui/hls/loader/SubtitlesLevelLoader.as
@@ -107,8 +107,9 @@

                 // if stream is live, use a timer to periodically reload playlist
                 if (!Manifest.hasEndlist(string)) {
-                    //var timeout : int = Math.max(10000, subtitlesLevel.targetduration); //Math.max(10000, _reloadPlaylistTimer + 1000*(frags.length-1)*subtitlesLevel.targetduration - getTimer());
-                    var timeout : int = Math.max(10000, _reloadPlaylistTimer + 1000*(frags.length-1)*subtitlesLevel.averageduration - getTimer());
+                    //var timeout : int = Math.max(10000, _reloadPlaylistTimer + 1000*(frags.length-1)*subtitlesLevel.targetduration - getTimer());
+                    //var timeout : int = Math.max(10000, _reloadPlaylistTimer + 1000*(frags.length-1)*subtitlesLevel.averageduration - getTimer());
+                    var timeout : int = Math.max(10000, _reloadPlaylistTimer+subtitlesLevel.averageduration-getTimer());

                     CONFIG::LOGGING {
                         Log.debug("Subtitles Level Live Playlist parsing finished: reload in " + timeout + " ms");


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

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

 package mx.olap
 {


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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11995
Author:   doug.lee@ssbbartgroup.com
Date:     2009-11-19T18:50:30.831767Z

Log Message:
-----------
Updated all AccImpls that use MSAA constants (except TextLayout) to
use the new AccConst references instead of hard-coding hex numbers and
local copies of the constants.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LabelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextInputAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowedApplicationAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SpinnerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/DropDownListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RichEditableTextAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/NumericStepperAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SkinnableTextBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ToggleButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/accessibility/WindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/VideoPlayerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TitleWindowAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/AlertAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/AlertAccImpl.as
@@ -15,6 +15,7 @@
 import flash.accessibility.Accessibility;
 import flash.accessibility.AccessibilityProperties;
 import flash.events.Event;
+import mx.accessibility.AccConst;
 import mx.controls.Alert;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
@@ -96,7 +97,7 @@
 	{
 		super(master);

-		role = 0x08; // ROLE_SYSTEM_ALERT
+		role = AccConst.ROLE_SYSTEM_ALERT;
 	}

 	//--------------------------------------------------------------------------
@@ -168,15 +169,15 @@

 				Accessibility.updateProperties();

-				Accessibility.sendEvent(titleBar,0,0x0011); // DialogEnd
-				Accessibility.sendEvent(titleBar,0,0x8004); // ObjectReorder
-				Accessibility.sendEvent(titleBar,0,0x8001); // ObjectDestroyed
-				Accessibility.sendEvent(titleBar,0,0x800B); // LocationChanged
-				Accessibility.sendEvent(titleBar,0,0x800F); // ParentChanged
-				Accessibility.sendEvent(titleBar,0,0x0003); // ObjectHide
-				Accessibility.sendEvent(titleBar,0,0x0003); // ForegroundChanged
+				Accessibility.sendEvent(titleBar,0,AccConst.EVENT_SYSTEM_DIALOGEND);
+				Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_REORDER);
+				Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_DESTROY);
+				Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_LOCATIONCHANGE);
+				Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_PARENTCHANGE);
+				Accessibility.sendEvent(titleBar,0,AccConst.EVENT_OBJECT_HIDE);
+				Accessibility.sendEvent(titleBar,0,AccConst.EVENT_SYSTEM_FOREGROUND);
 				if (SystemManager(master.parent).stage.focus)
-					Accessibility.sendEvent(SystemManager(master.parent).stage.focus,0,0x8005); // Focus
+					Accessibility.sendEvent(SystemManager(master.parent).stage.focus,0,AccConst.EVENT_OBJECT_FOCUS);

 				break;
 			}
@@ -202,15 +203,15 @@

 				Accessibility.updateProperties();

-				Accessibility.sendEvent(titleBar, 0, 0x0010); // DialogStart
-				Accessibility.sendEvent(titleBar, 0, 0x8004); // ObjectReorder
-				Accessibility.sendEvent(titleBar, 0, 0x8000); // ObjectCreated
-				Accessibility.sendEvent(titleBar, 0, 0x800B); // LocationChanged
-				Accessibility.sendEvent(titleBar, 0, 0x800F); // ParentChanged
-				Accessibility.sendEvent(titleBar, 0, 0x0002); // ObjectShow
-				Accessibility.sendEvent(titleBar, 0, 0x0003); // ForegroundChanged
-				Accessibility.sendEvent(titleBar, 0, 0x8005); // Focus
-				Accessibility.sendEvent(Alert(master).alertForm.defaultButton, 0, 0x8005); // Focus
+				Accessibility.sendEvent(titleBar, 0, AccConst.EVENT_SYSTEM_DIALOGSTART);
+				Accessibility.sendEvent(titleBar, 0, AccConst.EVENT_OBJECT_REORDER);
+				Accessibility.sendEvent(titleBar, 0, AccConst.EVENT_OBJECT_CREATE);
+				Accessibility.sendEvent(titleBar, 0, AccConst.EVENT_OBJECT_LOCATIONCHANGE);
+				Accessibility.sendEvent(titleBar, 0, AccConst.EVENT_OBJECT_PARENTCHANGE);
+				Accessibility.sendEvent(titleBar, 0, AccConst.EVENT_OBJECT_SHOW);
+				Accessibility.sendEvent(titleBar, 0, AccConst.EVENT_SYSTEM_FOREGROUND);
+				Accessibility.sendEvent(titleBar, 0, AccConst.EVENT_OBJECT_FOCUS);
+				Accessibility.sendEvent(Alert(master).alertForm.defaultButton, 0, AccConst.EVENT_OBJECT_FOCUS);

 				break;
 			}


Transferred from the Adobe Open Source Subversion Repository

Revision: 11883
Author:   jon.avila@ssbbartgroup.com
Date:     2009-11-17T03:00:26.636230Z

Log Message:
-----------
Accessibility implementation for Label.
QE notes: none
Doc notes: none
Bugs: n/a
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LabelAccImpl.as

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

--- frameworks/projects/mx/src/mx/accessibility/LabelAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/LabelAccImpl.as
@@ -0,0 +1,226 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.accessibility
+{
+
+import flash.accessibility.Accessibility;
+import flash.events.Event;
+import mx.accessibility.AccImpl;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+import mx.controls.Label;
+
+use namespace mx_internal;
+
+
+/**
+ *  LabelAccImpl is a subclass of AccessibilityImplementation
+ *  which implements accessibility for the Label class.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class LabelAccImpl extends AccImpl
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static const STATE_SYSTEM_READONLY:uint = 0x00000040;
+
+    /**
+     *  @private
+     */
+    private static const STATE_SYSTEM_FOCUSABLE:uint = 0x00100000;
+
+    /**
+     *  @private
+     */
+    private static const EVENT_OBJECT_NAMECHANGE:uint = 0x800C;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Enables accessibility in the Label class.
+     *
+     *
This method is called by application startup code
+     *  that is autogenerated by the MXML compiler.
+     *  Afterwards, when instances of Labels are initialized,
+     *  their accessibilityImplementation property
+     *  will be set to an instance of this class.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static function enableAccessibility():void
+    {
+        Label.createAccessibilityImplementation =
+            createAccessibilityImplementation;
+    }
+
+    /**
+     *  @private
+     *  Creates a Label's AccessibilityImplementation object.
+     *  This method is called from UIComponent's
+     *  initializeAccessibility() method.
+     */
+    mx_internal static function createAccessibilityImplementation(
+                                component:UIComponent):void
+    {
+        component.accessibilityImplementation =
+            new LabelAccImpl(component);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param master The UIComponent instance that this AccImpl instance
+     *  is making accessible.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function LabelAccImpl(master:UIComponent)
+    {
+        super(master);
+
+        role = 0x29; // ROLE_SYSTEM_STATICTEXT
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  eventsToHandle
+    //----------------------------------
+
+    /**
+     *  @private
+     *    Array of events that we should listen for from the master component.
+     */
+    override protected function get eventsToHandle():Array
+    {
+        return super.eventsToHandle.concat(["updateComplete"]);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: AccessibilityImplementation
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  IAccessible method for returning the state of the Label.
+     *  States are predefined for all the components in MSAA.
+     *  Values are assigned to each state.
+     *  Depending upon the Label being enabled,
+     *  a state is returned.
+     *
+     *  @param childID uint
+     *
+     *  @return State uint
+     */
+    override public function get_accState(childID:uint):uint
+    {
+        var accState:uint = getState(childID);
+
+        accState &= ~STATE_SYSTEM_FOCUSABLE;
+
+        accState |= STATE_SYSTEM_READONLY;
+
+        return accState;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  method for returning the name of the Label
+     *  which is spoken out by the screen reader
+     *  The Label should return the label inside as the name of the Label.
+     *  The name in AccessibilityProperties is combined with the name
+     *  specified here.
+     *
+     *  @param childID uint
+     *
+     *  @return Name String
+     */
+    override protected function getName(childID:uint):String
+    {
+        var label:String = Label(master).text;
+
+        return label != null && label != "" ? label : "";
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Override the generic event handler.
+     *  All AccImpl must implement this
+     *  to listen for events from its master component.
+     */
+    override protected function eventHandler(event:Event):void
+    {
+        // Let AccImpl class handle the events
+        // that all accessible UIComponents understand.
+        $eventHandler(event);
+
+        switch (event.type)
+        {
+            case "updateComplete":
+            {
+                Accessibility.sendEvent(master, 0, EVENT_OBJECT_NAMECHANGE);
+                Accessibility.updateProperties();
+                break;
+            }
+        }
+    }
+}
+
+}


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

--- frameworks/projects/mx/src/mx/events/NumericStepperEvent.as
+++ frameworks/projects/mx/src/mx/events/NumericStepperEvent.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: 4958
Author:   rfrishbe@adobe.com
Date:     2009-02-13T23:07:46.243121Z

Log Message:
-----------
Change the initialization sequence of FxComponent and Group.  Basically now children (including the skin) should get created at createChildren() time and follow the correct lifecycle pattern.  Unfortunately, this change got mingled in with all my PARB changes, so I'm submitting a bunch of PARB changes for Group, DataGroup, FxContainer, and FxDataContainer, outlined below:

1.     New event classes/names for Group/FxContainer and DataGroup ("elementAdd" and "elementRemove" event of type ElementExistenceEvent for Group/FxContainer and "rendererAdd" and "rendererRemove" event of type RendererExistenceEvent for DataGroup). It was just one event class of ItemExistenceChangedEvent before.
2.     LayoutBase.clipContent->clipAndEnableScrolling (same with IViewport.clipContent and GroupBase.clipContent)
3.     GroupBase.getLayoutELementAt()->getElementAt()
4.     GroupBase.numLayoutElements -> numElements.
5.     LayoutBase.virtualLayout -> useVirtualLayout
6.     ScrollUnit constants are now changed to be uints instead of typed as ScrollUnit.  This means the signature for getHorizontalScrollPositionDelta(unit:ScrollUnit):Number has changed to getHorizontalScrollPositionDelta(scrollUnit:uint):Number (and ditto for getVerticalScrollPositionDelta())
7.  DataGroup.getRendererForItemAt() -> getElementAt()
8.  DataGroup.getItemIndexForRenderer() -> getElementIndex()

Other changes:
 - Change IVisualElement interface so that it's smaller now.  It also extends ILayoutElement now.  The properties removed from IVisualElement are: rotation, rotationX, rotationY, rotationZ, transformX, transformY, offsets, x, y, z, scaleX, scaleY, scaleZ, explicitWidth, explicitMinWidth, explicitMaxWidth, explicitHeight, explicitMinHeight, explicitMaxHeight)
-  Fix in DataGroup so we don’t remove/add elements if we’re gonna do it later anyways.  I also need to do some other work in here around cleaning up of renderers.
- AddItems fix around handling IVisualElementContainers more effeciently
- get mxmlContent now returns a copy of the Array rather than the one we're using internally
- Had to update mustella since there was special case logic for dealing with getLayoutElementAt().  I added this logic for getElementAt(), which replaces that method.

QE Notes: Thanks for changing all the tests and working on the cyclone
Doc Notes: Made some ASDoc changes to some core classes to move the comments into the interfaces.  I did update the comments a bit as well.
Bugs: SDK-18115, SDK-19004
Reviewer: Jason, Glenn, Hans for initialization sequence change and Hans for all PARB changes
tests: checkintests, all mustella tests

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as" copyfrom-rev="4812" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ElementExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.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/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/RendererExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/mustella.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -14,27 +14,27 @@
 import mx.core.UIComponent;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
-import mx.events.ItemExistenceChangedEvent;
+import mx.events.RendererExistenceEvent;
 import mx.layout.LayoutBase;
 import mx.layout.LayoutElementFactory;

 /**
- *  Dispatched when an item is added to the content holder.
- *  event.
+ *  Dispatched when a renderer is added to the content holder.
+ * event.renderer is the renderer that was added.
  *
- *  @eventType mx.events.ItemExistenceChangedEvent.ITEM_ADD
+ *  @eventType mx.events.RendererExistenceEvent.RENDERER_ADD
  */
-[Event(name="itemAdd", type="mx.events.ItemExistenceChangedEvent")]
+[Event(name="rendererAdd", type="mx.events.RendererExistenceEvent")]

 /**
- *  Dispatched when an item is removed from the content holder.
- *  event.
+ *  Dispatched when a renderer is removed from the content holder.
+ * event.renderer is the renderer that was removed.
  *
- *  @eventType mx.events.ItemExistenceChangedEvent.ITEM_REMOVE
+ *  @eventType mx.events.RendererExistenceEvent.ITEM_REMOVE
  */
-[Event(name="itemRemove", type="mx.events.ItemExistenceChangedEvent")]
+[Event(name="rendererRemove", type="mx.events.RendererExistenceEvent")]

 //--------------------------------------
 //  Other metadata
@@ -328,7 +328,7 @@
         for (var idx:int = numChildren; idx > 0; idx--)
             super.removeChildAt(0);

-        var vLayout:Boolean = layout && layout.virtualLayout;
+        var vLayout:Boolean = layout && layout.useVirtualLayout;

         // Create all item renderers eagerly
         if (_dataProvider && !vLayout)
@@ -451,10 +451,10 @@

         _layeringFlags &= ~LAYERING_DIRTY;

-        var len:int = numLayoutElements;
+        var len:int = numElements;
         for (var i:int = 0; i < len; i++)
         {
-            var myItemRenderer:IVisualElement = getRendererForItemAt(i);
+            var myItemRenderer:IVisualElement = getElementAt(i);
             var layer:Number = myItemRenderer.layer;

             if (layer != 0)
@@ -521,7 +521,7 @@
     /**
      *  @private
      */
-    override public function get numLayoutElements():int
+    override public function get numElements():int
     {
         return dataProvider ? dataProvider.length : 0;
     }
@@ -561,7 +561,7 @@
      *  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 getLayoutElementAt() doc.
+     *  in the getElementAt() doc.
      */
     private function finishVirtualLayout():void
     {
@@ -597,7 +597,9 @@
             }
             else
             {
-                dispatchEvent(new ItemExistenceChangedEvent(ItemExistenceChangedEvent.ITEM_REMOVE, false, false, item, -1, elt));
+                // TODO (rfrishbe): it's not quite i + startIndex, especially when considering the layer property.
+                dispatchEvent(new RendererExistenceEvent(RendererExistenceEvent.RENDERER_REMOVE,
+                                false, false, elt, i + lastValidChildIndex, item));
                 super.removeChild(DisplayObject(elt));
             }
         }
@@ -614,14 +616,14 @@
         if (!virtualLayoutUnderway)
             super.invalidateSize();
     }
-
+
     /**
      *  @private
      *  Make sure there's a typicalLayoutElement for virtual layout.
      */
     override protected function measure():void
     {
-        if (layout && layout.virtualLayout)
+        if (layout && layout.useVirtualLayout)
             ensureTypicalLayoutElement();
         super.measure();
     }
@@ -632,7 +634,7 @@
      */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        if (layout && layout.virtualLayout)
+        if (layout && layout.useVirtualLayout)
         {
             virtualLayoutUnderway = true;
             virtualLayoutStartIndex = -1;
@@ -646,31 +648,26 @@
             finishVirtualLayout();
             virtualLayoutUnderway = false;
         }
-    }
-
-    /**
-     *  @private
-     *
-     * - Recycling -
-     *
-     *  Currently, item renderers ("IRs") can only be recycled if they're all
-     *  of the same type, they implement IDataRenderer, and they're all
-     *  produced - by the itemRenderer factory - with the same initial
-     *  configuration.  We can't ever really guarantee this however the case
-     *  for which we're assuming that it's true is when just the itemRenderer
-     *  is specified.  Even in this case, for recycling to work the
-     *  itemRenderer (factory) must be essentially stateless, the IRs
-     *  appearance must be based exclusively on its data.  For this reason
-     *  we're also defeating recycling of IRs that don't implement
-     *  IDataRenderer, see endVirtualLayout().  Although one could recycle
-     *  these IRs, doing so would imply that either all of the IRs were
-     *  the same, or that some did implement IDataRenderer and others
-     *  did not.   We can't handle the latter, and a DataGroup where
-     *  all items are the same wouldn't be worth the trouble.
-     */
-    override public function getLayoutElementAt(index:int):ILayoutElement
-    {
-        if (dataProvider == null)
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  For a DataGroup, getElementAt() returns the ItemRenderer
+     *  being used for the dataProvider item at the specified index.
+     *
+     *  If the index is invalid, or if a dataProvider was not specified, then
+     *  null is returned.
+     *
+     *  If the layout is virtual and the specified item isn't "in view", then
+     *  null will be returned.
+     *
+     *  Note that if the layout is virtual, ItemRenderers that are scrolled
+     *  out of view may be reused.
+     */
+    override public function getElementAt(index:int):IVisualElement
+    {
+        if ((index < 0) || (dataProvider == null) || (index >= dataProvider.length))
             return null;

         var item:Object = dataProvider.getItemAt(index);
@@ -678,6 +675,23 @@

         if (virtualLayoutUnderway)
         {
+            /* - Recycling -
+             *
+             *  Currently, item renderers ("IRs") can only be recycled if they're all
+             *  of the same type, they implement IDataRenderer, and they're all
+             *  produced - by the itemRenderer factory - with the same initial
+             *  configuration.  We can't ever really guarantee this however the case
+             *  for which we're assuming that it's true is when just the itemRenderer
+             *  is specified.  Even in this case, for recycling to work the
+             *  itemRenderer (factory) must be essentially stateless, the IRs
+             *  appearance must be based exclusively on its data.  For this reason
+             *  we're also defeating recycling of IRs that don't implement
+             *  IDataRenderer, see endVirtualLayout().  Although one could recycle
+             *  these IRs, doing so would imply that either all of the IRs were
+             *  the same, or that some did implement IDataRenderer and others
+             *  did not.   We can't handle the latter, and a DataGroup where
+             *  all items are the same wouldn't be worth the trouble.
+             */
             if (virtualLayoutStartIndex == -1)  // initialized in updateDisplayList()
             {
                 virtualLayoutStartIndex = index;
@@ -719,60 +733,31 @@
             if ((createdIR || recycledIR) && (elt is IInvalidating))
                 IInvalidating(elt).validateNow();
             if (createdIR)
-                dispatchEvent(new ItemExistenceChangedEvent(ItemExistenceChangedEvent.ITEM_ADD, false, false, item));
-        }
-
-        return LayoutElementFactory.getLayoutElementFor(elt);
-    }
-
-    /**
-     *  Return the ItemRenderer being used for the dataProvider item at
-     *  the specified index.
-     *
-     *  If the index is invalid, or if a dataProvider was not specified, then
-     *  null is returned.
-     *
-     *  If the layout is virtual and the specified item isn't "in view", then
-     *  null will be returned.
-     *
+                dispatchEvent(new RendererExistenceEvent(RendererExistenceEvent.RENDERER_ADD,
+                                    false, false, elt, index, item));
+        }
+
+        return elt;
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  For a datagroup, this returns the index of the dataProvider
+     *  item that the specified ItemRenderer
+     *  is being used for, or -1 if there is no such item.
+     *
+     *  If renderer is null, or if a dataProvider was not specified, then -1
+     *  is returned.
+     *
      *  Note that if the layout is virtual, ItemRenderers that are scrolled
      *  out of view may be reused.
-     *
-     *
-     *  @param index The dataProvider item index.
-     *  @return The ItemRenderer being used for the dataProvider item at index.
-     *
-     *  @see #getItemIndexForRenderer
-     *  @see dataProvider
-     */
-    public function getRendererForItemAt(index:int):IVisualElement
-    {
-        if ((index < 0) || (dataProvider == null) || (index >= dataProvider.length))
-            return null;
-        return itemToRenderer[dataProvider.getItemAt(index)];
-    }
-
-    /**
-     *  Return the index of the dataProvider item that the specified ItemRenderer
-     *  is being used for, or -1 if there is no such item.
-     *
-     *  If renderer is null, or if a dataProvider was not specified, then -1
-     *  is returned.
-     *
-     *  Note that if the layout is virtual, ItemRenderers that are scrolled
-     *  out of view may be reused.
-     *
-     *  @param renderer The ItemRenderer.
-     *  @return The index of the dataProvider item that the specified ItemRenderer is being used for, or -1
-     *
-     *  @see #getRendererForItemAt
-     *  @see dataProvider
-     */
-    public function getItemIndexForRenderer(renderer:IVisualElement):int
-    {
-        if ((dataProvider == null) || (renderer == null))
+     */
+    override public function getElementIndex(element:IVisualElement):int
+    {
+        if ((dataProvider == null) || (element == null))
             return -1;
-        var item:Object = (renderer is IDataRenderer) ? IDataRenderer(renderer).data : renderer;
+        var item:Object = (element is IDataRenderer) ? IDataRenderer(element).data : element;
         return dataProvider.getItemIndex(item);
     }

@@ -801,9 +786,9 @@
         itemToRenderer[item] = myItemRenderer;

         addItemRendererToDisplayList(myItemRenderer as DisplayObject, index);
-        dispatchEvent(new ItemExistenceChangedEvent(
-                      ItemExistenceChangedEvent.ITEM_ADD, false, false,
-                      item, index, myItemRenderer));
+        dispatchEvent(new RendererExistenceEvent(
+                      RendererExistenceEvent.RENDERER_ADD, false, false,
+                      myItemRenderer, index, item));

         invalidateSize();
         invalidateDisplayList();
@@ -824,9 +809,9 @@
         var myItemRenderer:IVisualElement = itemToRenderer[item];
         delete itemToRenderer[item];

-        dispatchEvent(new ItemExistenceChangedEvent(
-                      ItemExistenceChangedEvent.ITEM_REMOVE, false, false,
-                      item, index, myItemRenderer));
+        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,
@@ -894,6 +879,9 @@
      */
     protected function dataProvider_collectionChangeHandler(event:CollectionEvent):void
     {
+        if (dataProviderChanged || itemRendererChanged)
+            return;
+
         switch (event.kind)
         {
             case CollectionEventKind.ADD:


Transferred from the Adobe Open Source Subversion Repository

Revision: 11170
Author:   rfrishbe@adobe.com
Date:     2009-10-26T23:15:30.879444Z

Log Message:
-----------
ItemRenderer changes.  Fixing some bugs with the autoDrawBackground flag.  Also making some PARB changes:

1.  IItemRenderer.index -> itemIndex (affects DefaultItemRenderer, ItemRenderer, and ButtonBarButton).
2.  GroupBase.renderBackgroundFill() (protected method) -> drawBackground() (mx_internal method)
3.  ItemRenderer.handleBackgroundFill -> autoDrawBackground
4.  Removed contentBackgroundColor from ItemRenderer

Also, DefaultItemRenderer is now no longer an MXML file, but it is an AS-only class that extends UIComponent.

QE notes: -
Doc notes: Yes - Can you please look at the ASDocs for DefaultItemRenderer.as and the autoDrawBackground flag on ItemRenderer
Bugs: -
Reviewer: Deepa
Tests run: checkintests, Mustella List, DataGroup, DropDownList
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.mxml" copyfrom-rev="11100" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/IItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultComplexItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.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/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -791,7 +791,7 @@

         // Set the index
         if (renderer is IItemRenderer)
-            IItemRenderer(renderer).index = index;
+            IItemRenderer(renderer).itemIndex = index;

         // If a delegate is specified defer to the rendererUpdateDelegate
         // to update the renderer.
@@ -1055,7 +1055,7 @@
      */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        renderBackgroundFill();
+        drawBackground();

         if (layout && layout.useVirtualLayout)
         {
@@ -1254,7 +1254,7 @@
                 renderer = indexToRenderer[i] as IItemRenderer;

                 if (renderer)
-                    renderer.index = i;
+                    renderer.itemIndex = i;
                 // TODO (rfrishbe): could make this more optimal by only re-computing a subset of the visible
                 // item renderers, but it's probably not worth it
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7530
Author:   hmuller@adobe.com
Date:     2009-06-03T19:07:27.102549Z

Log Message:
-----------
Reverted the changes I accidentally committed in SVN 7529.  Oops.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4/.project</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -677,10 +677,7 @@

         if(_layeringFlags & LAYERING_DIRTY)
         {
-            if (layout && layout.useVirtualLayout)
-                invalidateDisplayList();
-            else
-                manageDisplayObjectLayers();
+            manageDisplayObjectLayers();
         }

         if (typicalItemChanged)
@@ -984,8 +981,6 @@
         if (virtualLayoutUnderway)
         {
             finishVirtualLayout();
-            if(_layeringFlags & LAYERING_DIRTY)
-                manageDisplayObjectLayers();
             virtualLayoutUnderway = false;
         }
     }
@@ -1267,9 +1262,10 @@
                 insertIndex = index;

             // Quietly ignore invalid indices since they're typically caused
-            // by duplicate data items and Halo quietly ignored those
+            // by duplicate data items and Halo quietly ignore those
             if ((insertIndex >= 0) && (insertIndex < super.numChildren))
                 super.setChildIndex(child, insertIndex);
+
             return child;
         }
         else if (child.parent && child.parent is DataGroup)


Transferred from the Adobe Open Source Subversion Repository

Revision: 3509
Author:   jimurphy@adobe.com
Date:     2008-10-07T18:19:17.646255Z

Log Message:
-----------
Rename of flex -> mx.

For compatibility reasons it was decided that the new functionality remain integrated with the old framework, although we will continue to build two separate SWCs, one with primarily existing framework classes, and one with new Flex 4 classes. This change removes duplicate names from the Flex 4 framework to avoid class name overlapping with the old framework code.  The naming overlap consists of two major areas:  New Components, and New Effects

Modified Paths:
--------------
386 paths were modified

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

--- frameworks/projects/spark/src/spark/effects/easing/Power.as
+++ frameworks/projects/spark/src/spark/effects/easing/Power.as
@@ -8,7 +8,7 @@
 //  in accordance with the terms of the license agreement accompanying it.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flex.effects.easing
+package mx.effects.easing
 {
 /**
  * Provides easing functionality using a polynomial expression, where the


Make Timer.repeatCount writeable (and mimic Flash Player's behaviour when you set it to a value higher than the currentCount).

--- tamarin-central/thane/as3src/flash/utils/Timer.as
+++ tamarin-central/thane/as3src/flash/utils/Timer.as
@@ -22,16 +22,19 @@
         reset();
     }

+    /** The total number of times the timer has fired since it started at zero. */
     public function get currentCount () :int
     {
         return _currentCount;
     }

+    /** The delay, in milliseconds, between timer events. */
     public function get delay () :Number
     {
         return _delay;
     }

+    /** The delay, in milliseconds, between timer events. */
     public function set delay (value :Number) :void
     {
         _delay = value;
@@ -40,17 +43,31 @@
             start();
         }
     }
-
+
+    /** The total number of times the timer is set to run. */
     public function get repeatCount () :int
     {
         return _repeatCount;
     }

+    /** The total number of times the timer is set to run. */
+    public function set repeatCount (count :int) :void
+    {
+        _repeatCount = count;
+        if (_repeatCount > 0 && _repeatCount < _currentCount) {
+            stop();
+        }
+    }
+
+    /** The timer's current state; true if the timer is running, otherwise false. */
     public function get running () :Boolean
     {
         return _buddy != null;
     }

+    /**
+     * Starts the timer, if it is not already running.
+     */
     public function start () :void
     {
         if (_buddy != null) {
@@ -60,6 +77,9 @@
         scheduleBuddy(new Buddy(this));
     }

+    /**
+     * Stops the timer.
+     */
     public function stop () :void
     {
         // cut any current enqueued buddy adrift
@@ -69,6 +89,10 @@
         }
     }

+    /**
+     * Stops the timer, if it is running, and sets the currentCount property back to 0,
+     * like the reset button of a stopwatch.
+     */
     public function reset () :void
     {
         stop();
@@ -81,13 +105,16 @@
             // the timer was stopped since this buddy was enqueued
             return;
         }
+
         _currentCount ++;
         dispatchEvent(new TimerEvent(TimerEvent.TIMER));
+
+        // if the timer was stop()'ed in the TIMER event itself, do not requeue!
         if (_buddy == null) {
-            // the timer was stopped in the TIMER event itself - do not requeue!
-            return;
-        }
-
+            return;
+        }
+
+        // if we're repeating forever, or still got a ways to go, reschedule, else finish
         if (repeatCount == 0 || _currentCount < _repeatCount) {
             scheduleBuddy(_buddy);


Fixed problems in the FlexUnitCIPrinter.as class. Now working with more recent flexunit ant task versions. Problem was invalid xml being sent. Like times containing decimals whlie unexpected by the ant task. All tasks get run before the ant task acknowledges it ready for test results.

--- asunit-4.0/src/asunit/printers/FlexUnitCIPrinter.as
+++ asunit-4.0/src/asunit/printers/FlexUnitCIPrinter.as
@@ -1,181 +1,285 @@
 package asunit.printers {
-	import asunit.framework.IResult;
-	import asunit.framework.IRunListener;
-	import asunit.framework.ITestFailure;
-	import asunit.framework.ITestSuccess;
-	import asunit.framework.ITestWarning;
-	import asunit.framework.Method;
-
-	import flash.events.DataEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.events.IOErrorEvent;
-	import flash.events.SecurityErrorEvent;
-	import flash.events.TimerEvent;
-	import flash.net.XMLSocket;
-	import flash.system.fscommand;
-	import flash.utils.Timer;
-	import flash.utils.getQualifiedClassName;
-	import flash.utils.getTimer;
-
-	public class FlexUnitCIPrinter extends EventDispatcher implements IRunListener
-	{
-		protected static const DEFAULT_SERVER:String = "127.0.0.1";
-		protected static const DEFAULT_PORT:uint = 1024;
-
-		public var port:uint;
-		public var server:String; //this is local host. same machine
-
-		private static const SUCCESS:String = "success";
-		private static const ERROR:String = "error";
-		private static const FAILURE:String = "failure";
-		private static const IGNORE:String = "ignore";
-
-		private static const START_OF_TEST_RUN_ACK : String = "<startOfTestRunAck/>";
-		private static const END_OF_TEST_ACK : String ="<endOfTestRunAck/>";
-		private static const END_OF_TEST_RUN : String = "<endOfTestRun/>";
-
-		private var socket:XMLSocket;
-		private var connectTimeout:Timer;
-
-		protected var messageQueue:Array;
-
-		private var startTime : int;
-
-		public function FlexUnitCIPrinter()
-		{
-			this.port = port;
-			this.server = server;
-			messageQueue = [];
-
-			socket = new XMLSocket();
-			socket.addEventListener(Event.CONNECT, onConnect);
-			socket.addEventListener(DataEvent.DATA, onData);
-			socket.addEventListener(IOErrorEvent.IO_ERROR, onErrorEvent);
-			socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onErrorEvent);
-   	   		socket.addEventListener(Event.CLOSE, onErrorEvent);
-
-			connectTimeout = new Timer(5000, 1);
-			connectTimeout.addEventListener(TimerEvent.TIMER_COMPLETE, onConnectTimeout);
-			connectTimeout.start();
-
-			connect();
-		}
-
-		protected function connect(ip:String = DEFAULT_SERVER, port:uint = DEFAULT_PORT):void {
-   	   		try {
-   	   			socket.connect(ip, port);
-   	   		}
-			catch (e:Error) {
-   	   			trace('## Error connecting to socket: ' + e.message);
-   	   		}
-		}
-
-		private function onConnectTimeout(event:TimerEvent):void {
-			throw new Error('Timed out waiting to connect to socket.');
-		}
-
-		public function onTestIgnored(method:Method):void {
-			var xmlMessageIgnore:String = "<testcase classname='" + getQualifiedClassName(method.scope)
-				+ "' name='" + method.name + "' status='"+IGNORE+"'>"
-				+ "<skipped />"
-				+ "</testcase>";
-			sendMessage(xmlMessageIgnore);
-		}
-
-		protected static function xmlEscapeMessage(message:String):String {
-			if (!message) return '';
-
-			var escape:XML = <escape/>;
-			escape.setChildren( message );
-			return escape.children()[0].toXMLString();
-		}
-
-		public function onTestFailure(failure:ITestFailure):void {
-			sendMessage(getFailureMessage(failure));
-		}
-
-		protected function getFailureMessage(failure:ITestFailure):String {
+
+    import asunit.framework.IResult;
+    import asunit.framework.IRunListener;
+    import asunit.framework.ITestFailure;
+    import asunit.framework.ITestSuccess;
+    import asunit.framework.ITestWarning;
+    import asunit.framework.Method;
+
+    import flash.events.DataEvent;
+    import flash.events.Event;
+    import flash.events.EventDispatcher;
+    import flash.events.IOErrorEvent;
+    import flash.events.SecurityErrorEvent;
+    import flash.events.TimerEvent;
+    import flash.net.XMLSocket;
+    import flash.system.fscommand;
+    import flash.utils.Timer;
+    import flash.utils.getQualifiedClassName;
+    import flash.utils.getTimer;
+
+    public class FlexUnitCIPrinter extends EventDispatcher implements IRunListener
+    {
+        protected static const DEFAULT_PORT: uint = 1024;
+        protected static const DEFAULT_SERVER: String = "127.0.0.1";
+        private static const SUCCESS: String = "success";
+        private static const ERROR: String = "error";
+        private static const FAILURE: String = "failure";
+        private static const IGNORE: String = "ignore";
+
+        private var messageQueue: Array = [];
+
+        private var _ready: Boolean = false;
+
+        private static const END_OF_TEST_ACK: String ="<endOfTestRunAck/>";
+        private static const END_OF_TEST_RUN: String = "<endOfTestRun/>";
+        private static const START_OF_TEST_RUN_ACK: String = "<startOfTestRunAck/>";
+
+        private var socket: XMLSocket;
+
+        public var port: uint;
+
+        public var server: String; //this is local host. same machine
+
+        private var timeOut: Timer;
+        private var lastTestTime: Number = 0;
+        private var startTime: Number;
+
+        /**
+         *
+         */
+        public function FlexUnitCIPrinter(port: uint = DEFAULT_PORT, server: String = DEFAULT_SERVER)
+        {
+            this.port = port;
+            this.server = server;
+
+            messageQueue = [];
+
+            socket = new XMLSocket ();
+            socket.addEventListener( DataEvent.DATA, dataHandler );
+            socket.addEventListener( Event.CONNECT, handleConnect );
+            socket.addEventListener( IOErrorEvent.IO_ERROR, errorHandler);
+            socket.addEventListener( SecurityErrorEvent.SECURITY_ERROR,errorHandler);
+            socket.addEventListener( Event.CLOSE,errorHandler);
+
+            timeOut = new Timer( 2000, 1 );
+            timeOut.addEventListener(TimerEvent.TIMER_COMPLETE, declareBroken, false, 0, true );
+            timeOut.start();
+
+            try
+            {
+                socket.connect( server, port );
+                timeOut.stop();
+            } catch (e:Error) {
+                //This needs to be more than a trace
+                trace (e.message);
+            }
+        }
+
+        /**
+         * Invoked when the timeout has been met, cancel everything
+         */
+        private function declareBroken( event:TimerEvent ):void {
+            errorHandler( new Event( "broken") );
+        }
+
+        /**
+         *
+         */
+        protected function sendResults(msg:String):void
+        {
+            if(socket.connected)
+            {
+                trace("sending message")
+                socket.send( msg );
+            } else {
+                // queue to message for when we are connected to the server
+                trace("sendResults(): Queuing message: " + msg);
+                messageQueue.push(msg);
+            }
+
+            trace(msg);
+        }
+
+        /**
+         *
+         */
+        private function handleConnect(event:Event):void
+        {
+            trace("handleConnect()");
+        }
+
+        private function sendQueueTestResults(): void
+        {
+            trace("sendQueueTestResults()");
+            for each ( var message: String in messageQueue )
+            {
+                trace("sendQueueTestResults(): msg=" + message);
+                sendResults(message);
+            }
+        }
+
+        /**
+         *
+         */
+        private function errorHandler(event:Event):void
+        {
+            trace("errorHandler()");
+            if ( !ready ) {
+                //If we are not yet ready and received this, just inform the core so it can move on
+//              dispatchEvent( new Event( AsyncListenerWatcher.LISTENER_FAILED ) );
+            } else {
+                //If on the other hand we were ready once, then the core is counting on us... so, if something goes
+                //wrong now, we are likely hung up. For now we are simply going to bail out of this process
+                exit();
+            }
+        }
+
+        /**
+         *
+         */
+        private function dataHandler( event : DataEvent ) : void
+        {
+            var data : String = event.data;
+            trace("FlexUnitCIPrinter#dataHandler: " + data);
+
+            // If we received an acknowledgement on startup, the java server is read and we can start sending.
+            if ( data == START_OF_TEST_RUN_ACK ) {
+                setStatusReady();
+            } else if ( data == END_OF_TEST_ACK ) {
+                // If we received an acknowledgement finish-up.
+                // Close the socket.
+                socket.close();
+                exit();
+            }
+        }
+
+        public function get ready():Boolean
+        {
+            return _ready;
+        }
+
+        protected function setStatusReady(): void
+        {
+            trace("FlexUnitCIPrinter#setStatusReady()");
+            _ready = true;
+
+            clientConnected();
+        }
+
+        protected function clientConnected(): void
+        {
+            trace("FlexUnitCIPrinter#clientConnected()");
+
+            // now that we are connectd lets send all the test results which are already available
+            sendQueueTestResults();
+        }
+
+        protected function exit(): void
+        {
+            trace("FlexUnitCIPrinter#exit()");
+            fscommand("quit");
+        }
+
+        ///////////
+
+        public function onRunStarted(): void
+        {
+            trace("onRunStarted()");
+        }
+
+        public function onTestStarted(test:Object):void
+        {
+            trace("onTestStarted()");
+            startTime = getTimer();
+            lastTestTime = getTimer(); // for the first test being run
+        }
+
+        public function onTestCompleted(test:Object):void
+        {
+            var duration:Number = getTimer() - startTime;
+            var className: String = getQualifiedClassName(test);
+
+            trace("onTestCompleted(): className=" + className + " duration=" + duration);
+        }
+
+        public function onTestFailure(failure:ITestFailure):void
+        {
+            trace("onTestFailure()");
+			sendResults(getFailureMessage(failure));
+            lastTestTime = getTimer();
+
+        }
+
+        private function getFailureMessage(failure:ITestFailure): String
+        {
+            var duration:Number = getTimer() - startTime;
 			var status:String = failure.isFailure ? FAILURE : ERROR;
-//			var stackTrace:String = xmlEscapeMessage(failure.thrownException.getStackTrace());
 			var stackTrace:String = failure.thrownException.getStackTrace();
 			var xml:String =
 				"<testcase classname='" + getQualifiedClassName(failure.failedTest)
 				+ "' name='" + failure.failedMethod
-				+ "' time='0.000' status='" + status + "'>"
-
+				+ "' time='" + duration + "' status='" + status + "'>"
+
 					+ "<error message='" + xmlEscapeMessage(failure.exceptionMessage)
 					+ "' type='"+ getQualifiedClassName(failure.thrownException) +"' >"
 						+ "<![CDATA[" + stackTrace + "]]>"
 					+ "</error>"
-
+
 				+ "</testcase>";

 			return xml;
-		}
-
-		protected function sendMessage(message:String):void {
-			if (!socket.connected) {
-				messageQueue.push(message);
-				return;
-			}
-			socket.send(message);
-		}
-
-		protected function onConnect(event:Event):void {
-			connectTimeout.stop();
-			sendQueuedMessages();
-		}
-
-		protected function sendQueuedMessages():void {
-			while (messageQueue.length) {
-				sendMessage(messageQueue.shift());
-			}
-		}
-
-		private function onData( event : DataEvent ) : void
-		{
-			if (event.data == END_OF_TEST_ACK) {
-				exit();
-			}
-		}
-
-		protected function onErrorEvent(event:Event):void {
-			trace('FlexUnitCIPrinter::onErrorEvent() - event: ' + event);
-			//throw new Error('FlashBuilderPrinter::onErrorEvent() - event: ' + event);
-		}
-
-		public function onRunStarted():void {
-		}
-
-        public function onTestStarted(test:Object):void {
-            startTime = getTimer();
-        }
-
-        public function onTestCompleted(test:Object):void {
-//            testTimes.push({test:test, duration:duration});
-        }
-
-		public function onTestSuccess(success:ITestSuccess):void
-		{
-			//TODO: move test time into ITestSuccess
-            var duration:Number = (getTimer() - startTime) / 1000;
-			var xmlMessageSuccess:String = "<testcase classname='" + getQualifiedClassName(success.test)
-				+ "' name='" + success.method + "' time='0.000' status='"+SUCCESS+"'/>";
-			sendMessage(xmlMessageSuccess);
-		}
-
-		public function onRunCompleted(result:IResult):void {
-			sendMessage(END_OF_TEST_RUN);
-		}
-
-		protected function exit():void
-		{
-			socket.close();
-			fscommand("quit");
-		}
-
-		public function onWarning(warning:ITestWarning) : void {
-		}
-	}
-}
+        }
+
+        protected static function xmlEscapeMessage(message:String):String {
+			if (!message) return '';
+
+			var escape:XML = <escape/>;
+			escape.setChildren( message );
+			return escape.children()[0].toXMLString();
+        }
+
+        public function onTestSuccess(success:ITestSuccess):void
+        {
+            var duration:Number = getTimer() - lastTestTime;
+            var methodName: String = success.method;
+            var featureName: String = success.feature;
+            var className: String = getQualifiedClassName(success.test);
+
+            trace("onTestSuccess(): methodName=" +methodName + " featureName=" + featureName + " className=" + className + " duration=" + duration);
+
+            sendResults("<testcase classname=\"" + className +"\" name=\"" + methodName +"\" time=\"" + duration +"\" status=\"success\" />");
+
+
+            lastTestTime = getTimer();
+        }
+
+        public function onTestIgnored(method:Method):void
+        {
+            trace("onTestIgnored()");
+            var duration:Number = getTimer() - lastTestTime;
+            var methodName: String = method.name;
+            var className: String = getQualifiedClassName(method.scope);
+
+            var xml:String =
+            				"<testcase classname=\""+className+"\" name=\""+methodName+"\" time=\"" + duration  + "\" status=\""+IGNORE+"\">"
+            				+ "<skipped />"
+            				+ "</testcase>";
+            sendResults(xml);
+
+            lastTestTime = getTimer();
+        }
+
+        public function onWarning(warning:ITestWarning):void
+        {
+            trace("onWarning()");
+        }
+
+        public function onRunCompleted(result:IResult):void
+        {
+            trace("onRunCompleted()");
+			sendResults(END_OF_TEST_RUN);
+        }
+    }
+}


fix comment for asdoc

fix comment for asdoc

--- src/com/google/analytics/core/DomainNameMode.as
+++ src/com/google/analytics/core/DomainNameMode.as
@@ -86,7 +86,7 @@
          * you would set the domain name as follows :
          * <pre class="prettyprint">
          * pageTracker.setDomainName( new Domain( DomainName.custom, ".example.com" ) ) ;
-         * </pre>
+         * </p>
          */
         public static const custom:DomainNameMode  = new DomainNameMode( 2, "custom" );


increase DebounceTest timeout due to imprecision of flash.utils.Timer

--- asx_test/src/asx/fn/DebounceTest.as
+++ asx_test/src/asx/fn/DebounceTest.as
@@ -19,7 +19,7 @@
 		public function invokes_the_original_function_after_debounced_function_stops_being_called_for_wait_milliseconds():void
 		{
 			var dispatcher:EventDispatcher = new EventDispatcher();
-			Async.proceedOnEvent(this, dispatcher, Event.COMPLETE, 1000);
+			Async.proceedOnEvent(this, dispatcher, Event.COMPLETE, 1500);

 			var start:int = getTimer();
 			var complete:Function = function():void {


Handle boolean arrays from the server.

Handle boolean arrays from the server.

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

--- src/as/com/threerings/io/streamers/ArrayStreamer.as
+++ src/as/com/threerings/io/streamers/ArrayStreamer.as
@@ -33,6 +33,9 @@

         } else if (secondChar === "I") {
             _elementType = int;
+
+        } else if (secondChar === "B") {
+            _elementType = Boolean;

         } else {
             Log.getLog(this).warning("Other array types are " +


Change 20081217-maxcarlson-n by maxcarlson@Bank.lan on 2008-12-17 04:24:29 PST
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix runtime exception fired at end of mp3 playback in swf9

Bugs Fixed: LPP-7496 - swf9 mp3 player causing exception when end of file is reached

Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)

Details: Avoid dereferencing null soundChannel objects.  Reset this.frame = this.totalframes after sending the lastframe resource event.

Tests: See LPP-7496

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

--- WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
@@ -525,7 +525,11 @@
         * @return Number: the current frame when playback was stopped
         */
       private function stopPlay () :Number {
-          var frame:Number = Math.floor(this.soundChannel.position * 0.001 * MP3_FPS);
+          if (this.soundChannel) {
+             var frame:Number = Math.floor(this.soundChannel.position * 0.001 * MP3_FPS);
+          } else {
+             var frame:Number = this.frame;
+          }

           this.playing = this.owner.playing = false;
           this.removeEventListener(Event.ENTER_FRAME, soundFrameHandler);
@@ -616,6 +620,8 @@
               // So instead of comparing 'frame' == 'totalframes',
               // we'll send the 'lastframe'-event when playback stopped.
               this.owner.resourceevent('lastframe', null, true);
+              // needs to be reset again!
+              this.frame = this.totalframes;
               this.stopPlay();
           }
       }


Problem with all these outparams is you need to guard against aliasing. I look forward to writing the unit tests. Namaste.

--- raw/src/org/yellcorp/lib/geom/RectUtil.as
+++ raw/src/org/yellcorp/lib/geom/RectUtil.as
@@ -35,10 +35,13 @@
         rect:Rectangle, out:Rectangle = null):Rectangle
     {
         if (!out) out = new Rectangle();
+
+        var r:Number = rect.right, b:Number = rect.bottom;
+
         out.x = Math.floor(rect.x);
         out.y = Math.floor(rect.y);
-        out.width = Math.ceil(rect.right) - out.x;
-        out.height = Math.ceil(rect.bottom) - out.y;
+        out.width = Math.ceil(r) - out.x;
+        out.height = Math.ceil(b) - out.y;
         return out;
     }

@@ -46,10 +49,13 @@
         rect:Rectangle, out:Rectangle = null):Rectangle
     {
         if (!out) out = new Rectangle();
+
+        var r:Number = rect.right, b:Number = rect.bottom;
+
         out.x = Math.ceil(rect.x);
         out.y = Math.ceil(rect.y);
-        out.width = Math.floor(rect.right) - out.x;
-        out.height = Math.floor(rect.bottom) - out.y;
+        out.width = Math.floor(r) - out.x;
+        out.height = Math.floor(b) - out.y;
         return out;
     }


change format

change format

--- src/com/merlinds/miracle_tool/controllers/PublishCommand.as
+++ src/com/merlinds/miracle_tool/controllers/PublishCommand.as
@@ -102,7 +102,7 @@
 		}

 		private function createAnimationOutput(animationVO:AnimationVO):Object {
-			var data:Object = { name:animationVO.name.substr(0, -4),// name of the mesh
+			var data:Object = { name:animationVO.name.substr(0, -4),// name of the matrix
 				totalFrames:animationVO.totalFrames,// Total animation frames
 				layers:[]};
 			var n:int = animationVO.timelines.length;
@@ -113,16 +113,16 @@
 				var layer:Layer = new Layer();
 				for(var j:int = 0; j < m; j++){
 					var frameVO:FrameVO = timelineVO.frames[j];
-					//create mesh
-					var mesh:MeshMatrix = frameVO.matrix != null ? new MeshMatrix( 0, 0,
+					//create matrix
+					var matrix:MeshMatrix = frameVO.matrix != null ? new MeshMatrix( 0, 0,
 							frameVO.matrix.tx,
 							frameVO.matrix.ty
 							//TODO calculate scale and skew
 						) : null;
-					var index:int = mesh == null ? -1 : layer.meshes.push(mesh);
+					var index:int = matrix == null ? -1 : layer.matrixList.push(matrix) - 1;
 					var framesArray:Array = this.createFramesInfo(index, frameVO.name,
 							frameVO.duration, frameVO.type == "motion");
-					layer.frames = layer.frames.concat(framesArray);
+					layer.framesList = layer.framesList.concat(framesArray);
 				}
 				data.layers.push(layer);
 			}
@@ -131,17 +131,17 @@
 		}

 		[Inline]
-		private function createFramesInfo(meshIndex:int, polygonName:String,
+		private function createFramesInfo(index:int, polygonName:String,
 		                                  duration:int, motion:Boolean):Array {
 			var result:Array = new Array(duration);
 			if(duration < 2){
 				motion = false;
 			}
-			if(meshIndex > -1){
+			if(index > -1){
 				var t:Number = 1 / (duration - 1);
 				for(var i:int = 0; i < duration; i++){
 					var frameInfoData:FrameInfoData = new FrameInfoData();
-					frameInfoData.meshIndex = meshIndex;
+					frameInfoData.index = index;
 					frameInfoData.polygonName = polygonName;
 					frameInfoData.motion = motion;
 					frameInfoData.t = motion ? t * i : 0;
@@ -162,18 +162,18 @@
 	}
 }
 class Layer{
-	public var meshes:Array;
-	public var frames:Array;
+	public var matrixList:Array;
+	public var framesList:Array;

 	public function Layer() {
-		this.frames = [];
-		this.meshes = [];
+		this.framesList = [];
+		this.matrixList = [];
 	}
 }

 class FrameInfoData{
 	public var polygonName:String;
 	public var motion:Boolean;
-	public var meshIndex:int;
+	public var index:int;
 	public var t:Number;
 }


Added clock to datawriter

Added clock to datawriter

--- src/Modules/DataWriter.as
+++ src/Modules/DataWriter.as
@@ -3,13 +3,15 @@
 	import Layouts.*;
 	import Layouts.Nodes.*;
 	import Components.Port;
+	import Displays.DModule;
+	import Displays.DClockModule;

 	import flash.geom.Point;
 	/**
 	 * ...
 	 * @author Nicholas "PleasingFungus" Feinberg
 	 */
-	public class DataWriter extends Module {
+	public class DataWriter extends Module implements Clockable {

 		protected var lastMomentStored:int = -1;
 		public function DataWriter(X:int, Y:int) {
@@ -26,7 +28,7 @@
 		}

 		override protected function generateLayout():ModuleLayout {
-			var layout:ModuleLayout = super.generateLayout();
+			var layout:ModuleLayout = new DefaultLayout(this, 3, 6);
 			layout.ports[0].offset.y += 2;
 			layout.ports[1].offset.x += 2;
 			return layout;
@@ -38,7 +40,21 @@
 			lineNode.type = new NodeType(0x0, U.LINE_NUM.color);
 			layout.ports[0].port.name = "Input";
 			var writeNode:InternalNode = new BigNode(this, new Point(layout.ports[1].offset.x-1, layout.ports[0].offset.y), [layout.ports[0], lineNode], [], getNextValue, "Next Value");
-			return new InternalLayout([lineNode, writeNode]);
+
+			var controlNode:StandardNode = new StandardNode(this, new Point(layout.ports[0].offset.x + 2, layout.ports[1].offset.y + 2), [],
+															[new NodeTuple(layout.ports[0], writeNode, writeOK)], function ticksUntilWrite():IntegerValue {
+																return new IntegerValue(U.state.time.clockPeriod - (U.state.time.moment % U.state.time.clockPeriod));
+															}, "Memory value at line will be set to input value in");
+			//controlNode.type = NodeType.TOGGLE;
+			return new InternalLayout([lineNode, writeNode, controlNode]);
+		}
+
+		public function getClockNode():InternalNode {
+			return internalLayout.nodes[internalLayout.nodes.length - 1];
+		}
+
+		override public function generateDisplay():DModule {
+			return new DClockModule(this, this);
 		}

 		override public function renderDetails():String {
@@ -61,7 +77,7 @@
 			if (index < 0 || index >= U.state.memory.length)
 				return NilValue.NIL;

-			if (!willWrite())
+			if (!writeOK())
 				return NilValue.NIL;

 			return inputs[0].getValue();
@@ -70,7 +86,7 @@
 		override public function updateState():Boolean {
 			if (U.state.time.moment == lastMomentStored)
 				return false; //can only store at most once per cycle
-			if (!willWrite())
+			if (!writeOK())
 				return false;

 			var line:Value = controls[0].getValue();
@@ -87,7 +103,7 @@
 			return true;
 		}

-		private function willWrite():Boolean {
+		private function writeOK():Boolean {
 			return (U.state.time.moment % U.state.time.clockPeriod) == U.state.time.clockPeriod - 1;
 		}

@@ -112,6 +128,10 @@
 			return memoryValue;
 		}

+		public function getClockFraction():Number {
+			return 1.0 / U.state.time.clockPeriod;
+		}
+
 		[Embed(source = "../../lib/art/modules/symbol_stamp_24.png")] private const _symbol:Class;
 	}


Fixed the toString() output a bit.

Fixed the toString() output a bit.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@52 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/parlor/game/data/GameObject.as
+++ src/as/com/threerings/parlor/game/data/GameObject.as
@@ -254,7 +254,7 @@
     override protected function whichBuf (buf :StringBuilder) :void
     {
         super.whichBuf(buf);
-        buf.append(players.join());
+        buf.append("(").append(players.join()).append(")");
         buf.append(":").append(state);
     }


Fix the chat input bug.
It's a mystery wrapped in a heisenbug inside sunspots.

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

--- src/as/com/threerings/flex/ChatControl.as
+++ src/as/com/threerings/flex/ChatControl.as
@@ -9,7 +9,6 @@
 import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
-import flash.events.TextEvent;

 import flash.ui.Keyboard;

@@ -22,6 +21,7 @@
 import mx.events.FlexEvent;

 import com.threerings.util.ArrayUtil;
+import com.threerings.util.MethodQueue;
 import com.threerings.util.StringUtil;

 import com.threerings.flex.CommandButton;
@@ -139,8 +139,16 @@
             return;
         }

-        // if there was no error, clear the entry area in prep for the next entry event
-        _txt.text = "";
+        // If there was no error, clear the entry area in prep for the next entry event
+        MethodQueue.callLater(function () : void {
+            // WORKAROUND
+            // Originally we cleared the text immediately, but with flex 3.2 this broke
+            // for *some* people. Weird! We're called from the event dispatcher for the
+            // enter key, so it's possible that the default action is booching it?
+            // In any case, this could possibly be removed in the future by the ambitious.
+            // Note also: Flex's built-in callLater() doesn't work, but MethodQueue does. WTF?!?
+            _txt.text = "";
+        });
         _histidx = -1;
     }


Fix using an already-instantiated icon in the addTitle() method.

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

--- src/as/com/threerings/flex/CommandMenu.as
+++ src/as/com/threerings/flex/CommandMenu.as
@@ -120,7 +120,7 @@
         if (icon is Class) {
             o["icon"] = icon;
         } else if (icon is IFlexDisplayObject) {
-            o["iconObj"] = icon;
+            o["iconObject"] = icon;
         }
         if (separatorAfter) {
             menuItems.unshift({ type: "separator" });


Transferred from the Adobe Open Source Subversion Repository

Revision: 18340
Author:   aharui@adobe.com
Date:     2010-10-27T20:27:32.263667Z

Log Message:
-----------
Need to reset the openItemsChanged flag

QE notes: none
Doc notes: none
Bugs: SDK-26576
Reviewer: Corey
Tests run: checkintests mustella full run
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Tree.as

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

--- frameworks/projects/mx/src/mx/controls/Tree.as
+++ frameworks/projects/mx/src/mx/controls/Tree.as
@@ -1144,6 +1144,8 @@
             //we always reset the open and selected items on a dataprovider assignment
             if (!openItemsChanged)
                 _openItems = {};
+
+            openItemsChanged = false;

             // are we swallowing the root?
             if (_rootModel && !_showRoot && _hasRoot)


- change: debug log removed

- change: debug log removed

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

--- src/reprise/ui/layoutmanagers/CSSBoxModelLayoutManager.as
+++ src/reprise/ui/layoutmanagers/CSSBoxModelLayoutManager.as
@@ -169,10 +169,6 @@
 				{
 					closeLineBox();
 					var childMarginTop:int = childStyle.collapsedMarginTop;
-					if (childMarginTop != childStyle.marginTop)
-					{
-						log('w nonmatch: ' + child);
-					}
 					var collapsedMargin:int;
 					if (collapsibleMargin >= 0 && childMarginTop >= 0)
 					{


Fix Event#formatToString's output

Fix Event#formatToString's output

--- src/flash/events/Event.as
+++ src/flash/events/Event.as
@@ -81,7 +81,10 @@
     for (var i:uint = 0; i < args.length; i++) {
       var field:String = args[i];
       var value:Object = this[field];
-      str += ' ' + field + '=' + value is String ? '"' + value + '"' : value;
+      if (value is String) {
+        value = '"' + value + '"';
+      }
+      str += ' ' + field + '=' + value;
     }
     return str + ']';
   }


Fix crash when lacking segment info.

Fix crash when lacking segment info.

--- HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
+++ HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
@@ -950,7 +950,8 @@
 				lastSequence = segments[segments.length - 1].id;
 			}

-			return "/" + sequenceSkips + "/" + lastQuality + "/" +  getSegmentBySequence(segments, lastSequence).continuityEra;
+			var lastSeg:HLSManifestSegment = getSegmentBySequence(segments, lastSequence);
+			return "/" + sequenceSkips + "/" + lastQuality + "/" +  (lastSeg ? lastSeg.continuityEra : 0);
 		}

 		// returns the time offset into the fragment based on the time


Fix for SUP-4670, skipping initial segment in manifests with non-zero starting time.

--- HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
+++ HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
@@ -870,6 +870,7 @@
 					{
 						// Check if we're seeking backwards...
 						var oldSeg:HLSManifestSegment = getSegmentContainingTime(getLastSequenceSegments(), time);
+						trace("getFileForTime - (A) found " + oldSeg + " for time " + time);
 						if(oldSeg)
 							return initiateBestEffortRequest(oldSeg.id, origQuality, segments, manifest);
 						else
@@ -885,7 +886,13 @@
 						}
 						else
 						{
-							return initiateBestEffortRequest(getLastSequence() + 1, origQuality, segments, manifest);
+							// Check if we're seeking backwards...
+							var beSeg:HLSManifestSegment = getSegmentContainingTime(segments, time);
+							trace("getFileForTime - (B) found " + beSeg + " for time " + time);
+							if(beSeg)
+								return initiateBestEffortRequest(beSeg.id, origQuality, segments, manifest);
+							else
+								return initiateBestEffortRequest(getLastSequence() + 1, origQuality, segments, manifest);
 						}
 					}
 				}
@@ -1091,16 +1098,21 @@
 			}

 			// If no old manifest, it's a new play session.
+			var didWeSeedLastSequence:Boolean = false;
 			if(oldManifest == null)
 			{
 				trace("SEEDING LAST SEQUENCE");
+				didWeSeedLastSequence = true;
+
 				if(currentManifest.streamEnds == true)
 				{
 					updateLastSequence(currentManifest, 0);
 				}
 				else
 				{
-					updateLastSequence(currentManifest, currentManifest.segments[Math.max(0, currentManifest.segments.length - HLSManifestParser.MAX_SEG_BUFFER + -1)].id);
+					updateLastSequence(currentManifest,
+						currentManifest.segments[Math.max(0,
+							currentManifest.segments.length - HLSManifestParser.MAX_SEG_BUFFER - 1)].id);
 				}
 			}

@@ -1141,8 +1153,9 @@
 				return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, 2);
 			}

-			// Advance sequence number.
-			newSequence++;
+			// Advance sequence number if we didn't seed.
+			if(!didWeSeedLastSequence)
+				newSequence++;

 			var segments:Vector.<HLSManifestSegment> = currentManifest.segments;