Transferred from the Adobe Open Source Subversion Repository

Revision: 18727
Author:   smgilson@adobe.com
Date:     2010-11-19T14:53:24.960578Z

Log Message:
-----------
ASDoc updates for Spark DataGrid

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

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridColumn.as
@@ -29,14 +29,20 @@
 use namespace mx_internal;

 /**
- *  A non-visual object that defines the mapping from each dataProvider item to a Grid column.
- *  Each dataProvider item corresponds to one Grid row and this object specifies the item property
- *  whose value is to be displayed in one column, the item renderer to display that value, the editor
- *  that's used to change the value, and so on.
+ *  The GridColumn class defines a column of a Spark grid control,
+ *  such as the Spark DataGrid or Grid control.
+ *  Each data provider item for the control corresponds to one row of the grid.
+ *  The GridColumn class specifies the field of the data provider item
+ *  whose value is to be displayed in the column.
+ *  It also specifies the item renderer used to display that value, the item editor
+ *  used to change the value, and other properties of the column.
+ *
+ *  @see spark.components.Grid
+ *  @see spark.components.DataGrid
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
- *  @playerversion AIR 2.0
+ *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
 public class GridColumn extends EventDispatcher
@@ -50,15 +56,17 @@
     //--------------------------------------------------------------------------

     /**
-     *  The return value for itemToLabel() or itemToDataTip() if resolving the corresponding
-     *  property name (path) fails.  The value of this constant is a single space: " ".
-     *
-     *  @see itemToLabel
-     *  @see itemToDataTip
+     *  The return value for the itemToLabel() or
+     *  itemToDataTip() method  if resolving the corresponding
+     *  property name (path) fails.
+     *  The value of this constant is a single space String: " ".
+     *
+     *  @see #itemToLabel
+     *  @see #itemToDataTip
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public static const ERROR_TEXT:String = new String(" ");
@@ -126,7 +134,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function GridColumn(columnName:String = null)
@@ -166,11 +174,11 @@
     [Bindable("gridChanged")]

     /**
-     *  The Grid this whose list of columns contains this Column, or null.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  The Grid object associated this whose column.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get grid():Grid
@@ -201,11 +209,12 @@
     [Bindable("columnIndexChanged")]

     /**
-     *  The position of this column in the grid's column list, or -1 if this column's grid is null.
+     *  The position of this column in the grid's column list,
+     *  or -1 if this column's grid is null.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get columnIndex():int
@@ -223,22 +232,32 @@
     [Bindable("dataFieldChanged")]

     /**
-     *  Names the dataProvider property whose value is used to initialize item renderer's
-     *  label string. In other words, the value of the itemRenderer's label property
-     *  for the row at rowIndex in this column is:
-     *  grid.dataProvider.getItemAt(rowIndex).dataField.toString().
-     *
-     *
If this column or its grid specifies a labelFunction, then the
-     *  dataField is not used.

-     *
+     *  The name of the field or property in the data provider item associated
+     *  with the column.
+     *  Each GridColumn requires this property or
+     *  the labelFunction property to be set
+     *  to calculate the displayable text for the item renderer.
+     *  If the dataField
+     *  and labelFunction properties are set,
+     *  the data is displayed using the labelFunction and sorted
+     *  using the dataField.
+     *
+     *
This value of this property is not necessarily the String that
+     *  is displayed in the column header.  This property is
+     *  used only to access the data in the data provider.
+     *  For more information, see the headerText property.

+     *
+     *
If the column or its grid specifies a labelFunction,
+     *  then the dataField is not used.

+     *
      *  @default null
      *
-     *  @see itemToLabel
-     *  @see labelFunction
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @see #itemToLabel
+     *  @see #labelFunction
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get dataField():String
@@ -285,21 +304,27 @@
     [Bindable("dataTipFieldChanged")]

     /**
-     *  The property of the dataProvider item to display as the dataTip for this column.
-     *  By default, if showDataTips=true, the itemRenderer's label is displayed
-     *  as the dataTip.  This property, which is similar to dataField, can
-     *  be specified to show a different value for the dataTip.
-     *
-     *
If this column or its grid specifies a dataTipFunction, then the
-     *  dataTipField is not used.

+     *  The name of the field in the data provider to display as the datatip.
+     *  By default, if showDataTips is true,
+     *  the associated grid control looks for a property named
+     *  label on each data provider item and displays it.
+     *  However, if the data provider does not contain a label
+     *  property, you can set the dataTipField property to
+     *  specify a different property name.
+     *  For example, you could set the value to "FullName" when a user views a
+     *  set of people's names included from a database.
+     *
+     *
If this column or its grid specifies a value for the
+     *  dataTipFunction property, then the
+     *  dataTipField property is ignored.

      *
      *  @default null
-     *  @see dataTipFunction
-     *  @see itemToDataTip
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @see #dataTipFunction
+     *  @see #itemToDataTip
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get dataTipField():String
@@ -332,32 +357,43 @@
     [Bindable("dataTipFunctionChanged")]

     /**
-     *  A function that converts a dataProvider item into a column-specific string
-     *  which will be displayed as a dataTip, if showDataTips=true.
-     *  A dataTipFunction can be use to combine the values of several dataProvider item
-     *  properties into a single string.  If specified, this property is used by the
-     *  itemToDataTip() method.
-     *
+     *  Specifies a callback function to run on each item of the data provider
+     *  to determine its dataTip.
+     *  This property is used by the itemToDataTip method.
+     *
+     *
By default, if showDataTips is true,
+     *  the column looks for a property named label
+     *  on each data provider item and displays it as its dataTip.
+     *  However, some data providers do not have a label property
+     *  nor do they have another property that you can use for displaying data
+     *  in the rows.
+     *  For example, you might have a data provider that contains a lastName
+     *  and firstName fields, but you want to display full names as the dataTip.
+     *  You can specify a function to the dataTipFunction property
+     *  that returns a single String containing the value of both fields. You
+     *  can also use the dataTipFunction property for handling
+     *  formatting and localization.

+     *
      *
The dataTipFunction's signature must match the following:
      *
      *
dataTipFunction(item:Object, column:GridColumn):String

      *
-     *  The item parameter is the dataProvider item for an entire row; it's
-     *  the value of grid.dataProvider.getItemAt(rowIndex).  The second
-     *  parameter is this column.

-     *
-     *
A typical dataTipFunction might concatenate the item's firstName and
-     *  lastName properties, or do some custom formatting on a Date valued
-     *  item property.

+     *  The item parameter is the data provider item for an entire row.
+     *  The second parameter is this column object.

+     *
+     *
A typical function might concatenate an item's firstName and
+     *  lastName properties, or do some custom formatting on a Date value
+     *  property.

+     *
      *
      *  @default null
      *
-     *  @see itemToDataTip
-     *  @see dataTipField
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @see #itemToDataTip
+     *  @see #dataTipField
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get dataTipFunction():Function
@@ -391,18 +427,18 @@
     [Inspectable(category="General")]

     /**
-     *  A flag that indicates whether the items in the column are editable.
-     *  If true, and the DataGrid's editable
+     *  Indicates whether the items in the column are editable.
+     *  If true, and the associated grid's editable
      *  property is also true, the items in a column are
      *  editable and can be individually edited
-     *  by clicking on a selected item or by navigating to the item and
+     *  by clicking on a selected item, or by navigating to the item and
      *  pressing the F2 key.
      *
      *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get editable():Boolean
@@ -431,8 +467,10 @@
     [Bindable("headerRendererChanged")]

     /**
-     *  A factory for the IGridItemRenderer used as the header for this column.  If unspecified,
-     *  the DataGrid's columnHeaderGroup skin part provides a default header renderer.
+     *  The class factory for the IGridItemRenderer class used as
+     *  the header for this column.
+     *  If unspecified, the DataGrid controls's columnHeaderGroup
+     *  skin part defines the default header renderer.
      *
      *  @default null
      *
@@ -441,7 +479,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get headerRenderer():IFactory
@@ -474,13 +512,13 @@
     [Bindable("headerTextChanged")]

     /**
-     *  Text for the header of this column. By default, the Grid
-     *  control uses the value of the dataField property
-     *  as the header text.
+     *  Text for the header of this column.
+     *  By default, the associated grid control uses the value of
+     *  the dataField property  as the header text.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get headerText():String
@@ -510,14 +548,7 @@
     [Inspectable(environment="none")]

     /**
-     *  Specifies the IME (input method editor) mode.
-     *  The IME enables users to enter text in Chinese, Japanese, and Korean.
-     *  Flex sets the specified IME mode when the control gets the focus,
-     *  and sets it back to the previous value when the control loses the focus.
-     *
-     *
The flash.system.IMEConversionMode class defines constants for the
-     *  valid values for this property.
-     *  You can also specify null to specify no IME.

+     *  @copy spark.components.gridClasses.GridItemEditor#imeMode
      *
      *  @see flash.system.IMEConversionMode
      *
@@ -525,7 +556,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get imeMode():String
@@ -550,18 +581,27 @@
     [Bindable("itemEditorChanged")]

     /**
-     *  A factory for IGridItemEditors used to edit individual grid cells in
-     *  this column.
-
-     *  If this property is null, and the column grid's owner is a DataGrid,
-     *  then the value of the DataGrid's itemEditor property is used.   If no
-     *  item editor is specified then TextGridItemEditor is used.
+     *  A class factory for IGridItemEditor class used to edit individual
+     *  grid cells in this column.
+     *  If this property is null, and the column grid's owner is a DataGrid control,
+     *  then the value of the DataGrid control's itemEditor property is used.
+     *  If no item editor is specified by the DataGrid control,
+     *  then use the TextGridItemEditor class.
+     *
+     *
The default item editor is the DefaultGridItemEditor class,
+     *  which lets you edit a simple text field.
+     *  You can create custom item renderers by creating a subclass of the GridItemEditor class.
+     *  Your custom item editor can write data to the entire row of the grid
+     *  to define more complex editor.

      *
      *  @default null
      *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @see spark.components.gridClasses.DefaultGridItemEditor
+     *  @see spark.components.gridClasses.GridItemEditor
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get itemEditor():IFactory
@@ -591,22 +631,27 @@
     [Bindable("itemRendererChanged")]

     /**
-     *  A factory for IGridItemRenderers used to render invidual grid cells.  If not specified,
-     *  the grid's itemRenderer is returned.
-     *
-     *
The default item renderer just displays the value of its label property,
-     *  which is based on the dataProvider item for the cell's row, and on the column's dataField
-     *  property.  Custom item renderers that derive more values from the data item and include
-     *  more complex visuals are easily created by subclassing GridItemRenderer.

-     *
-     *  @default The value of the grid's itemRenderer, or null.
+     *  The class factory for the IGridItemRenderer class used to
+     *  render individual grid cells.
+     *  If not specified, use the value of the itemRenderer
+     *  property from the associated grid control.
+     *
+     *
The default item renderer is the DefaultGridItemRenderer class,
+     *  which displays the data item as text.
+     *  You can create custom item renderers by creating a subclass of the GridItemRenderer class.
+     *  Your custom item renderer can access the data from the entire row of the grid
+     *  to define more complex visual representation of the cell.

+     *
+     *
The default value is the value of the itemRenderer
+     *  property from the associated grid control, or null.

      *
      *  @see #dataField
-     *  @see GridItemRenderer
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @see spark.skins.spark.DefaultGridItemRenderer
+     *  @see spark.components.gridClasses.GridItemRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get itemRenderer():IFactory
@@ -641,19 +686,20 @@

     /**
      *  If specified, the value of this property must be an idempotent function
-     *  that returns an item renderer IFactory based on its dataProvider item
-     *  and column parameters.  Specifying an itemRendererFunction makes it possible to
-     *  employ more than one item renderer in this column.
-     *
-     *
The itemRendererFunction's signature must match the following:
+     *  that returns an item renderer IFactory based on its data provider item
+     *  and column parameters.
+     *  Specifying a value to the itemRendererFunction property
+     *  makes it possible to use more than one item renderer in this column.
+     *
+     *
The function specified to the itemRendererFunction property
+     *  must have the following signature:

      *
      *
itemRendererFunction(item:Object, column:GridColumn):IFactory

      *
-     *  The item parameter is the dataProvider item for an entire row; it's
-     *  the value of grid.dataProvider.getItemAt(rowIndex).  The second
-     *  parameter is this column.

-     *
-     *
Here's an example of an itemRendererFunction:

+     *
The item parameter is the data provider item for an entire row.
+     *  The second parameter is this column object.

+     *
+     *
Shown below is an example of an item renderer function:

      *

      *  function myItemRendererFunction(item:Object, column:GridColumn):IFactory
      *  {
@@ -665,7 +711,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get itemRendererFunction():Function
@@ -699,34 +745,35 @@
     [Bindable("labelFunctionChanged")]

     /**
-     *  An idempotent function that converts a dataProvider item into a column-specific string
+     *  An idempotent function that converts a data provider item into a column-specific string
      *  that's used to initialize the item renderer's label property.
      *
-     *
A labelFunction can be use to combine the values of several dataProvider item
-     *  properties into a single string.  If specified, this property is used by the
+     *
You can use a label function to combine the values of several data provider items
+     *  into a single string.
+     *  If specified, this property is used by the
      *  itemToLabel() method, which computes the value of each item
-     *  renderer's label property in this column.

-     *
-     *
The labelFunction's signature must match the following:

+     *  renderer's label property in this column.

+     *
+     *
The function specified to the labelFunction property
+     *  must have the following signature:

      *
      *
labelFunction(item:Object, column:GridColumn):String

      *
-     *
The item parameter is the dataProvider item for an entire row; it's
-     *  the value of grid.dataProvider.getItemAt(rowIndex).  The second
-     *  parameter is this column.

-     *
-     *
A typical labelFunction might concatenate the item's firstName and
-     *  lastName properties, or do some custom formatting on a Date valued
-     *  item property.

+     *
The item parameter is the data provider item for an entire row.
+     *  The second parameter is this column object.

+     *
+     *
A typical label function could concatenate the firstName and
+     *  lastName properties of the data provider item ,
+     *  or do some custom formatting on a Date value property.

      *
      *  @default null
      *
-     *  @see itemToLabel
-     *  @see dataField
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @see #itemToLabel
+     *  @see #dataField
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get labelFunction():Function
@@ -760,14 +807,16 @@
     [Bindable("widthChanged")]

     /**
-     *  The width of this column in pixels. If specified, the grid's layout will ignore its
-     *  typicalItem and this column's minWidth and maxWidth.
+     *  The width of this column in pixels.
+     *  If specified, the grid's layout ignores its
+     *  typicalItem property and this column's
+     *  minWidth and maxWidth properties.
      *
      *  @default NaN
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get width():Number
@@ -808,16 +857,20 @@
     [Bindable("minWidthChanged")]

     /**
-     *  The minimum width of this column in pixels. If specified, the grid's layout will
-     *  make the column's layout width the larger of the typicalItem's width and the minWidth.
-     *  If this column is resizable, this property limits how small the user can make this column.
-     *  Setting this property will not change the width or maxWidth properties.
+     *  The minimum width of this column in pixels.
+     *  If specified, the grid's layout makes the column's layout
+     *  width the larger of the width of the typicalItem and
+     *  the minWidth.
+     *  If this column is resizable, this property limits how small
+     *  the user can make this column.
+     *  Setting this property does not change the width
+     *  or maxWidth properties.
      *
      *  @default 20
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get minWidth():Number
@@ -856,16 +909,18 @@
     [Bindable("maxWidthChanged")]

     /**
-     *  The maximum width of this column in pixels. If specified, the grid's layout will make
-     *  the column's layout width the smaller of the typicalItem's width and the maxWidth.
+     *  The maximum width of this column in pixels.
+     *  If specified, the grid's layout makes the column's layout width the
+     *  smaller of the width of the typicalItem and the maxWidth.
      *  If this column is resizable, this property limits how wide the user can make this column.
-     *  Setting this property will not change the width or minWidth properties.
+     *  Setting this property does not change the width
+     *  or minWidth properties.
      *
      *  @default NaN
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get maxWidth():Number
@@ -906,17 +961,19 @@
     /**
      *  Determines whether any of the item renderer's controls are editable.
      *  If the column is editable, the focusable controls in the item renderer
-     *  will be given keyboard focus when the user starts editing the item
+     *  are given keyboard focus when the user starts editing the item
      *  renderer.
      *
-     *
By setting this property to true, the developer takes responsibility for
-     *  validating and saving input collected by the renderer.  If the renderer is configured
-     *  with an override of the IGridItemRenderer prepare() method, then the developer must
-     *  ensure that unsaved input field changes are not overwritten.   For example, if
-     *  rendererIsEditable=true, the renderer contains a single TextInput element that displays
-     *  the value of data.myDataField, and the renderer's prepare() method sets the TextInput's
-     *  text property, then the prepare() method must not set the text property when there
-     *  are pending changes.

+     *
By setting this property to true, you take responsibility for
+     *  validating and saving input collected by the item renderer.
+     *  If the item renderer contains an override of the IGridItemRenderer.prepare() method,
+     *  then you must ensure that unsaved input field changes are not overwritten.
+     *  For example, rendererIsEditable is true
+     *  and the renderer contains a single TextInput element that displays
+     *  the value of data.myDataField.
+     *  If the renderer's prepare() method sets the TextInput control's
+     *  text property, then the prepare() method must
+     *  not set the text property when there are pending changes.

      *
      *
TBD: example code or link.

      *
@@ -924,7 +981,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get rendererIsEditable():Boolean
@@ -954,14 +1011,17 @@
     [Inspectable(category="General")]

     /**
-     *  Enable interactive resizing of this column's width if the grid's
-     *  resizableColumns property is also true.
+     *  Indicates whether the user is allowed to resize
+     *  the width of the column.
+     *  If true, and the resizableColumns property of
+     *  the associated grid is also true, the user can drag
+     *  the grid lines between the column headers to resize the column.
      *
      *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get resizable():Boolean
@@ -990,11 +1050,13 @@
     [Bindable("showDataTipsChanged")]

     /**
-     *  Show dataTips for the cells in this column.
-     *
-     *
If this property's value is undefined(the default), then the grid's showDataTips
-     *  property determines if dataTips will be shown.   If this property is set, then
-     *  the grid's showDataTips property is ignored.

+     *  Indicates whether the datatips are shown in the column.
+     *  If true, datatips are displayed for text in the rows.
+     *  Datatips are tooltips designed to show the text that is too long for the row.
+     *
+     *
If this property's value is undefined, the default, then the associated
+     *  grid's showDataTips property determines if datatips are shown.
+     *  If this property is set, the grid's showDataTips property is ignored.

      *
      *  @default undefined
      *
@@ -1002,7 +1064,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get showDataTips():*
@@ -1044,19 +1106,19 @@
     [Inspectable(category="General")]

     /**
-     *  If true, and if the grid's dataProvider is a ICollectionView,
-     *  and if the DataGrid's sortableColumns property is true,
-     *  then this column supports interactive sorting. Typically the column's
-     *  header handles mouse clicks by setting the dataProvider's sort property
-     *  to a Sort object whose SortField is this column's dataField.
+     *  If true, and if the grid's data provider is an ICollectionView,
+     *  and if the associated grid's sortableColumns property is true,
+     *  then this column supports interactive sorting.
+     *  Typically the column's header handles mouse clicks by setting the data provider's
+     *  sort property to a Sort object whose SortField is this column's dataField.
      *
-     *
If the dataProvider is not an ICollectionView, then this property has no effect.

+     *
If the data provider is not an ICollectionView, then this property has no effect.

      *
      *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get sortable():Boolean
@@ -1089,7 +1151,6 @@
     /**
      *  The function that compares two elements during a sort of on the
      *  data elements of this column.
-     *
      *  If you specify a value of the labelFunction property,
      *  you typically also provide a sortCompareFunction.
      *
@@ -1118,7 +1179,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get sortCompareFunction():Function
@@ -1148,20 +1209,21 @@
     [Bindable("sortDescendingChanged")]

     /**
-     *  If true, this column is sorted in descending order. For example, if the column's dataField
-     *  selects a numeric value, then the first row would be the one with the largest value
+     *  If true, this column is sorted in descending order.
+     *  For example, if the column's dataField contains a numeric value,
+     *  then the first row would be the one with the largest value
      *  for this column.
      *
      *
Setting this property does not start a sort; it only sets the sort direction.
-     *  Once dataProvider.refresh() is called, the sort will be performed.

-     *
-     *
If the dataProvider is not an ICollectionView, then this property has no effect.

+     *  When the dataProvider.refresh() method is called, the sort is performed.

+     *
+     *
If the data provider is not an ICollectionView, then this property has no effect.

      *
      *  @default false;
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get sortDescending():Boolean
@@ -1187,22 +1249,23 @@
     //----------------------------------

     /**
-     *  Read-only property that creates and returns a SortField that can
+     *  Returns a SortField that can
      *  be used to sort a collection by this column's dataField.
      *
-     *
If the sortCompareFunction is defined, it assigns the SortField's
-     *  compare function to a closure around the sortCompareFunction
-     *  that uses the right signature for the SortField and captures
-     *  this column.

-     *
-     *
If the sortCompareFunction and dataField are not defined but the
-     *  labelFunction is defined, then it assigns the compareFunction to a
-     *  closure that does a basic string compare on the labelFunction applied
-     *  to the data objects.

-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *
If the sortCompareFunction property is defined,
+     *  it assigns the SortField's compare function to a closure around
+     *  the sortCompareFunction that uses the right signature
+     *  for the SortField and captures this column.

+     *
+     *
If the sortCompareFunction and
+     *  dataField properties are not defined, but the
+     *  labelFunction property is defined, then it assigns the
+     *  compareFunction to a closure that does a basic string compare
+     *  on the labelFunction applied to the data objects.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get sortField():SortField
@@ -1252,14 +1315,15 @@
     [Bindable("visibleChanged")]

     /**
-     *  If true, then display this column.  If false, no space will be allocated
+     *  If true, then display this column.
+     *  If false, no space will be allocated
      *  for this column; it will not be included in the layout.
      *
      *  @default true
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get visible():Boolean
@@ -1331,28 +1395,33 @@
     }

     /**
-     *  Convert the specified dataProvider item to a column-specific String.
-     *  The value of this method is used to initialize item renderers' label property.
-     *
-     *
If labelFunction is null, and dataField is a string that does not contain "."
-     *  field name separator characters, then this method is equivalent to:
-     *  item[dataField].toString().   If dataField is a "." separated
-     *  path, then this method looks up each successive path element.  For example if
-     *  ="foo.bar.baz" then this method would return
-     *  the value of item.foo.bar.baz.   If resolving the item's dataField
+     *  Convert the specified data provider item to a column-specific String.
+     *  This method is used to initialize item renderers' label property.
+     *
+     *
If labelFunction is null, and dataField
+     *  is a string that does not contain "." field name separator characters,
+     *  then this method is equivalent to:

+     *
+     *
item[dataField].toString()

+     *
+     *
If dataField is a "." separated
+     *  path, then this method looks up each successive path element.
+     *  For example if ="foo.bar.baz", then this method returns
+     *  the value of item.foo.bar.baz.
+     *  If resolving the item's dataField
      *  causes an error to be thrown, ERROR_TEXT is returned.

      *
-     *
If item and labelFunction are not null then this method returns
-     *  labelFunction(item, this), where the second argument is
-     *  this GridColumn.

-     *
-     *  @param item The value of grid.dataProvider.getItemAt(rowIndex)
+     *
If item and labelFunction are not null,
+     *  then this method returns labelFunction(item, this),
+     *  where the second argument is this GridColumn.

+     *
+     *  @param item The value of grid.dataProvider.getItemAt(rowIndex).
      *
      *  @return A column-specific string for the specified dataProvider item or ERROR_TEXT.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function itemToLabel(item:Object):String
@@ -1361,27 +1430,33 @@
     }

     /**
-     *  Convert the specified dataProvider item to a column-specific dataTip String.
-     *
-     *
This method uses the values dataTipField and dataTipFunction and if
-     *  they're null, it uses the corresponding Grid properties.  If both dataTipField
-     *  properties are null then the dataField property is used.

-     *
-     *
If dataTipFunction is null, then this method is equivalent to:
-     *  item[dataTipField].toString().   If resolving the item's dataField
-     *  causes an error to be thrown, ERROR_TEXT is returned.

-     *
-     *
If item and dataTipFunction are not null then this method returns
+     *  Convert the specified data provider item to a column-specific datatip String.
+     *
+     *
This method uses the values dataTipField
+     *  and dataTipFunction.
+     *  If those properties are null, it uses the corresponding properties
+     *  from the associated grid control.
+     *  If dataTipField properties is also null in the grid control,
+     *  then use the dataField property.

+     *
+     *
If dataTipFunction is null, then this method is equivalent to:
+     *  item[dataTipField].toString().
+     *  If resolving the item's dataField
+     *  causes an error to be thrown, ERROR_TEXT is returned.

+     *
+     *
If item and dataTipFunction
+     *  are not null,  then this method returns
      *  dataTipFunction(item, this), where the second argument is
      *  this GridColumn.

      *
-     *  @param item The value of grid.dataProvider.getItemAt(rowIndex)
-     *
-     *  @return A column-specific string for the specified dataProvider item or ERROR_TEXT.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @param item The value of grid.dataProvider.getItemAt(rowIndex).
+     *
+     *  @return A column-specific string for the specified data provider item
+     *  or ERROR_TEXT.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function itemToDataTip(item:Object):String
@@ -1394,18 +1469,18 @@
     }

     /**
-     *  Convert the specified dataProvider item to a column-specific item renderer factory.
+     *  Convert the specified data provider item to a column-specific item renderer factory.
      *  By default this method calls the itemRendererFunction if it's
      *  non-null, otherwise it just returns the value of the column's itemRenderer
      *  property.
      *
-     *  @param item The value of grid.dataProvider.getItemAt(rowIndex)
+     *  @param item The value of grid.dataProvider.getItemAt(rowIndex).
      *
      *  @return A column-specific item renderer factory for the specified dataProvider item.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function itemToRenderer(item:Object):IFactory


Added backwards compatibility for Flash Player 10.2/10.3 without native
JSON support.

Change-Id: I4748a2701431e42d91f057b67f66d43edc1469ac

--- WeaveAPI/src/weave/api/WeaveAPI.as
+++ WeaveAPI/src/weave/api/WeaveAPI.as
@@ -549,23 +549,27 @@
 import mx.utils.UIDUtil;

 import weave.api.WeaveAPI;
+import weave.api.reportError;

 internal class ExternalMethod
 {
 	/**
+	 * This is set to true when the initialization code has been attempted.
+	 */
+	private static var initialized:Boolean = false;
+
+	/**
 	 * A pointer to JSON.
 	 */
 	private static var json:Object;

-	private static var stringify:Function;
-
 	/**
 	 * Maps a method name to the corresponding ExternalMethod object.
 	 */
 	private static const registeredMethods:Object = {};

 	/**
-	 * This is the name of the generic external interface function which uses JSON.stringify().
+	 * This is the name of the generic external interface function which uses JSON input and output.
 	 */
 	public static const JSON_CALL:String = "_jsonCall";

@@ -642,47 +646,62 @@
 	 */
 	public function ExternalMethod(host:Object, methodInfo:Object)
 	{
+		if (!initialized)
+		{
+			// one-time initialization attempt
+			initialized = true;
+			try
+			{
+				json = getDefinitionByName("JSON");
+				ExternalInterface.addCallback(JSON_CALL, handleJsonCall);
+				WeaveAPI.executeJavaScript(
+					{
+						"JSON_REPLACER": JSON_REPLACER,
+						"JSON_REVIVER": JSON_REVIVER,
+						"NOT_A_NUMBER": NOT_A_NUMBER,
+						"UNDEFINED": UNDEFINED,
+						"INFINITY": INFINITY,
+						"NEGATIVE_INFINITY": NEGATIVE_INFINITY
+					},
+					"weave[JSON_REPLACER] = function(key, value){",
+					"    if (value === undefined)",
+					"        return UNDEFINED;",
+					"    if (typeof value != 'number' || isFinite(value))",
+					"        return value;",
+					"    if (value == Infinity)",
+					"        return INFINITY;",
+					"    if (value == -Infinity)",
+					"        return NEGATIVE_INFINITY;",
+					"    return NOT_A_NUMBER;",
+					"};",
+					"weave[JSON_REVIVER] = function(key, value){",
+					"    if (value === NOT_A_NUMBER)",
+					"        return NaN;",
+					"    if (value === UNDEFINED)",
+					"        return undefined;",
+					"    if (value === INFINITY)",
+					"        return Infinity;",
+					"    if (value === NEGATIVE_INFINITY)",
+					"        return -Infinity;",
+					"    return value;",
+					"};"
+				);
+			}
+			catch (e:Error)
+			{
+				trace(e.getStackTrace() || "Your version of Flash Player does not have native JSON support.");
+			}
+		}
+
+		// backwards compatibility
 		if (!json)
 		{
-			// one-time external initialization
-			json = getDefinitionByName("JSON");
-			ExternalInterface.addCallback(JSON_CALL, handleJsonCall);
-			WeaveAPI.executeJavaScript(
-				{
-					"JSON_REPLACER": JSON_REPLACER,
-					"JSON_REVIVER": JSON_REVIVER,
-					"NOT_A_NUMBER": NOT_A_NUMBER,
-					"UNDEFINED": UNDEFINED,
-					"INFINITY": INFINITY,
-					"NEGATIVE_INFINITY": NEGATIVE_INFINITY
-				},
-				"weave[JSON_REPLACER] = function(key, value){",
-				"    if (value === undefined)",
-				"        return UNDEFINED;",
-				"    if (typeof value != 'number' || isFinite(value))",
-				"        return value;",
-				"    if (value == Infinity)",
-				"        return INFINITY;",
-				"    if (value == -Infinity)",
-				"        return NEGATIVE_INFINITY;",
-				"    return NOT_A_NUMBER;",
-				"};",
-				"weave[JSON_REVIVER] = function(key, value){",
-				"    if (value === NOT_A_NUMBER)",
-				"        return NaN;",
-				"    if (value === UNDEFINED)",
-				"        return undefined;",
-				"    if (value === INFINITY)",
-				"        return Infinity;",
-				"    if (value === NEGATIVE_INFINITY)",
-				"        return -Infinity;",
-				"    return value;",
-				"};"
-			);
-		}
-
-		var name:String = methodInfo.name;
-		method = host[name];
+			ExternalInterface.addCallback(methodInfo.name, host[methodInfo.name]);
+			return;
+		}
+
+		var methodName:String = methodInfo.name;
+		method = host[methodName];
 		// find the number of required parameters
 		paramCount = 0;
 		while (paramCount < method.length && !methodInfo.parameters[paramCount].optional)
@@ -693,7 +712,7 @@
 				"JSON_CALL": JSON_CALL,
 				"JSON_REPLACER": JSON_REPLACER,
 				"JSON_REVIVER": JSON_REVIVER,
-				"methodName": name,
+				"methodName": methodName,
 				"paramCount": paramCount
 			},
 			"weave[methodName] = function(){",
@@ -708,7 +727,7 @@
 			"}"
 		);

-		registeredMethods[name] = this;
+		registeredMethods[methodName] = this;
 	}

 	public var method:Function;


changed forgot email text to make sense now that we can change passwords

--- flexEditor/src/org/arisgames/editor/forms/ForgotAccountInformationFormView.as
+++ flexEditor/src/org/arisgames/editor/forms/ForgotAccountInformationFormView.as
@@ -68,7 +68,7 @@
     private function handleForgotPassword(obj:Object):void
     {
         trace("handleForgotPassword called with event: " + obj);
-        Alert.show("Your password has been reset and emailed to the email address on file for this account.", "Password Reset");
+        Alert.show("An email has been sent with instructions to change your password.", "Password Reset");
     }

     private function handleFault(obj:Object):void


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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -189,6 +189,18 @@
 [Style(name="backgroundAttachment", type="String", inherit="no")]

 /**
+ *  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")]
+
+/**
  *  The alpha value for the overlay that is placed on top of the
  *  container when it is disabled.
  *
@@ -198,6 +210,18 @@
  *  @productversion Flex 3
  */
 [Style(name="disabledOverlayAlpha", type="Number", inherit="no")]
+
+/**
+ *  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")]

 /**
  *  The name of the horizontal scrollbar style.
@@ -248,6 +272,19 @@
  *  @productversion Flex 3
  */
 [Style(name="paddingTop", type="Number", format="Length", inherit="no")]
+
+/**
+ *  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")]

 [ResourceBundle("core")]


Change 20080418-hqm-5 by hqm@badtzmaru.home on 2008-04-18 15:20:10 EDT
    in /Users/hqm/openlaszlo/trunk5/WEB-INF/lps/lfc
    for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc

Summary: fix stretches for swf9

New Features:

Bugs Fixed: LPP-5789

Technical Reviewer: max
QA Reviewer: pbr
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

+ use resource  width and height from compiler, not from runtime

+ consolidate applySTretches methods to work on runtime-loaded image data or compiled-in assets

+ make setResource call stop(1) to load initial asset

Tests:

examples/components/button_example.lzx
examples/components/checkbox_example.lzx
lztest
test/swf9/hello.lzx
smoke

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

--- WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
@@ -16,6 +16,7 @@
   import flash.display.*;
   import flash.events.*;
   import flash.ui.*;
+  import flash.geom.*;
   import mx.controls.Button;
   import flash.net.URLRequest;
 }#
@@ -40,7 +41,6 @@
       public var resource:String = null;
       public var source:String = null;
       public var clip:Boolean = false;
-      public var stretches:String = null;
       public var resourcewidth:Number = 0;
       public var resourceheight:Number = 0;
       public var isroot:Boolean = false;
@@ -110,7 +110,9 @@
       }

       public function draw():void {
-          if (this.bgcolor != null){
+          if (this.bgcolor == null){
+              this.graphics.clear();
+          } else {
               this.graphics.clear();
               this.graphics.beginFill(this.bgcolor);
               this.graphics.drawRect(0, 0, this.lzwidth, this.lzheight);
@@ -120,8 +122,6 @@

       var skiponload = false;
-      var resourceWidth;
-      var resourceHeight;
       var baseurl;
       function  __preloadFrames () { }

@@ -159,65 +159,13 @@
               return;
           }

-          this.resourceWidth = res.width;
-          this.resourceHeight = res.height;
-          this.skiponload = true;
-
-          this.owner.resourceload({
-              width:  this.resourceWidth,
-                      height: this.resourceHeight,
-                      sprite: this,
-                      resource: r,
-                      skiponload: true});
-
-          var asset:DisplayObject = null;
-          var prev_resource:DisplayObject;
-
-          // TODO [hqm 2008-01] How do we deal with multiframe embedded resources??
-          if ('assetclass' in res) {
-              var assetclass = res['assetclass'];
-              asset = new assetclass();
-              prev_resource = this.resourceObj;
-              this.resourceObj = asset;
-              addChild(asset);
-              // remove previous asset, and display new one
-              if (prev_resource != null) {
-                  removeChild(prev_resource);
-              }
-              return;
-          }
-
-          var urls = res.frames;
-
-          //Update the view's totalframes
-          this.owner.setTotalFrames (urls.length);
-
-          // It could be a multi-frame resource. Take first frame.
-          var url = urls[0];
-          if (url is Class) {
-              // resource is an embedded asset class
-              asset = new url();
-              prev_resource = this.resourceObj;
-              this.resourceObj = asset;
-              addChild(asset);
-              // remove previous asset, and display new one
-              if (prev_resource != null) {
-                  removeChild(prev_resource);
-              }
-          } else {
-              // resource is a string, so it's an URL
-              this.baseurl = '';
-              if (res.ptype) {
-                  if (res.ptype == 'sr') {
-                      this.baseurl = lzOptions.ServerRoot + '/';
-                  }
-                  //Debug.write('ptype', res.ptype, this.baseurl);
-              }
-
-              this.frames = urls;
-              this.__preloadFrames();
-              this.setSource(url, true);
-          }
+          this.resourcewidth = res.width;
+          this.resourceheight = res.height;
+          this.owner.setTotalFrames (res.frames.length);
+
+          // instantiate resource at frame 1
+          this.stop(1);
+          updateResourceSize();
       }

@@ -405,8 +353,9 @@
           o Sets the sprite to the specified width
       */
       public function setWidth( v:* ):void {
-          //trace('..sprite setWidth', v);
+          trace('..sprite setWidth', v, this.owner);
           this.lzwidth = v;
+          this.applyStretchResource();
           // TODO [hqm 2008-01] We need to add back in the code here to
           // update the clipping mask size, and resource stretching as well, see swf8 kernel
           if (this.clickregion != null) {
@@ -428,8 +377,9 @@
           o Sets the sprite to the specified height
       */
       public function setHeight( v:* ):void {
-          //trace('..sprite setHeight', v);
+          trace('..sprite setHeight', v, this.owner);
           this.lzheight = v;
+          this.applyStretchResource();
           // TODO [hqm 2008-01] We need to add back in the code here to
           // update the clipping mask size, and resource stretching as well, see swf8 kernel
           if (this.clickregion != null) {
@@ -522,55 +472,38 @@
           // So frames are one based, not zero based?
           var framenumber = fn - 1;
           if (this.resource == null) {
-              //trace("LzSprite.stop(",framenumber,") resource is null", this.owner, this.owner.name);
               return;
           }
-          var res = LzResourceLibrary[this.resource];
-          var frames = res.frames;
-
-          //trace('stop(', framenumber, ')  this.resource', this.resource, res, res.frames[framenumber]);
-
+          var resinfo = LzResourceLibrary[this.resource];
+          var frames = resinfo.frames;
           var prev_resource  = this.resourceObj;
-          var assetclass = frames[framenumber];
-
+          var assetclass;
+
+          // single frame resources get an entry in LzResourceLibrary which has
+          // 'assetclass' pointing to the resource Class object.
+          if (resinfo.assetclass is Class) {
+              assetclass = resinfo.assetclass;
+          } else {
+              // Multiframe resources have an array of Class objects in frames[]
+              assetclass = frames[framenumber];
+          }
           if (this.resourceCache == null) {
               this.resourceCache = [];
           }
           var asset:DisplayObject = this.resourceCache[framenumber];
-
           if (asset == null) {
               //trace('CACHE MISS, new ',assetclass);
               asset = new assetclass();
+              asset.scaleX = 1.0
+              asset.scaleY = 1.0;
               this.resourceCache[framenumber] = asset;
           }
-
           this.resourceObj = asset;
           addChild(asset);
           if (prev_resource != null && prev_resource != asset) {
               removeChild(prev_resource);
           }
-          this.applyStretchResourceLoaded();
-      }
-
-      public function applyStretchResourceLoaded():void {
-          if (this.resourceObj) {
-              if (this._setrescwidth) {
-                  this.resourcewidth = this.resourceObj.width;
-                  this.scaleX =  this.lzwidth / this.resourcewidth;
-                  //trace("scaleX = ", this.scaleX, this.lzwidth, '/', this.resourcewidth);
-              } else {
-                  //trace("scaleX = 1.0");
-                  this.scaleX = 1.0;
-              }
-              if (this._setrescheight) {
-                  this.resourceheight = this.resourceObj.height;
-                  this.scaleY =  this.lzheight / this.resourceheight;
-                  //trace("scaleY = ", this.scaleY, this.lzheight, '/', this.resourceheight);
-              } else {
-                  //trace("scaleY = 1.0");
-                  this.scaleY = 1.0;
-              }
-          }
+          this.applyStretchResource();
       }

@@ -619,11 +552,17 @@

       /** stretchResource( String:axes )
-          o Causes the sprite to stretch its resource along axes, either 'width' 'height' or 'both' so the resource is the same size as the sprite along those axes.
-          o If axes is not 'width', 'height' or 'both', the resource is sized to its natural/default size, rather than the sprite's size
+
+          o Causes the sprite to stretch its resource along axes,
+          either 'width' 'height' or 'both' so the resource is the
+          same size as the sprite along those axes.
+
+          o If axes is not 'width', 'height' or 'both', the resource
+          is sized to its natural/default size, rather than the
+          sprite's size
       */
       public function stretchResource( xory:String ):void {
-          //trace("stretchResource imgLoader="+imgLoader);
+          trace("stretchResource resourceObj=",this.resourceObj);
           if ( xory == null || xory == "x" || xory=="width" || xory=="both" ){
               this._setrescwidth = true;
           }
@@ -635,20 +574,20 @@
       }

       public function applyStretchResource():void {
-          if (this.resourceLoaded) {
-              if (this._setrescwidth) {
-                  this.resourcewidth = imgLoader.width;
-                  this.scaleX =  this.lzwidth / this.resourcewidth;
-              } else {
-                  this.scaleX = 1.0;
-              }
-              if (this._setrescheight) {
-                  this.resourceheight = imgLoader.height;
-                  this.scaleY =  this.lzheight / this.resourceheight;
-              } else {
-                  this.scaleY = 1.0;
-              }
-          }
+          var res = this.resourceObj;
+          trace("applyStretchResource resourceObj=", this.resourceObj, this.resourcewidth, this.resourceheight, this._setrescwidth, this._setrescheight, 'lzwidth', this.lzwidth, 'lzheight', this.lzheight);
+          // Don't try to do anything while an image is loading
+          if ( (res == null) || (res is Loader && !this.resourceLoaded)) { return; }
+
+          res.scaleX = 1.0;
+          if (this._setrescwidth) {
+              res.scaleX =  this.lzwidth / this.resourcewidth;
+          }
+
+          res.scaleY = 1.0;
+          if (this._setrescheight) {
+              res.scaleY =  this.lzheight / this.resourceheight;
+          }
       }

@@ -809,7 +748,7 @@

       function updateResourceSize () {
-          this.owner.resourceload({width: this.resourceWidth, height: this.resourceHeight, resource: this.resource, skiponload: true});
+          this.owner.resourceload({width: this.resourcewidth, height: this.resourceheight, resource: this.resource, skiponload: true});
       }


Transferred from the Adobe Open Source Subversion Repository

Revision: 7889
Author:   dsubrama@adobe.com
Date:     2009-06-16T20:01:19.393557Z

Log Message:
-----------
First batch of PARB changes to List, ListBase, ItemRenderer and IItemRenderer as documented here: https://zerowing.corp.adobe.com/display/flex/PARB_RENAME_LIST

QA: Yes
Docs: Yes
Checkintests: Pass

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/frameworks/projects/flex4/src/spark/skins/spark/DefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/IItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/DefaultComplexItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/IndexChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as
@@ -38,9 +38,8 @@
  *

  *  <ItemRenderer
  *    Properties
- *    allowDeselection="true"
  *    selected="false"
- *    caret="false"
+ *    showsCaret="false"
  *  />
  *

  *
@@ -224,65 +223,34 @@
     public var labelDisplay:TextGraphicElement;

     //----------------------------------
-    //  allowDeselection
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the allowDeselection property
-     */
-    private var _allowDeselection:Boolean = true;
-
-    /**
-     *  @inheritDoc
-     *
-     *  @default true
-     */
-    public function get allowDeselection():Boolean
-    {
-        return _allowDeselection;
-    }
-
-    /**
-     *  @private
-     */
-    public function set allowDeselection(value:Boolean):void
-    {
-        if (value == _allowDeselection)
-            return;
-
-        _allowDeselection = value;
-    }
-
-    //----------------------------------
-    //  caret
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the caret property
-     */
-    private var _caret:Boolean = false;
+    //  showsCaret
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the showsCaret property
+     */
+    private var _showsCaret:Boolean = false;

     /**
      *  @inheritDoc
      *
      *  @default false
      */
-    public function get caret():Boolean
-    {
-        return _caret;
+    public function get showsCaret():Boolean
+    {
+        return _showsCaret;
     }

     /**
      *  @private
      */
-    public function set caret(value:Boolean):void
-    {
-        if (value == _caret)
+    public function set showsCaret(value:Boolean):void
+    {
+        if (value == _showsCaret)
             return;

-        _caret = value;
+        _showsCaret = value;
         setCurrentState(getCurrentRendererState(), playTransitions);
     }

@@ -318,33 +286,33 @@
     }

     //----------------------------------
-    //  labelText
+    //  label
     //----------------------------------
     [Bindable("textChanged")]

     /**
      *  @private
-     *  Storage var for labelText
+     *  Storage var for label
      */
-    private var _labelText:String = "";
+    private var _label:String = "";

     /**
      *  @inheritDoc
      *
      *  @default ""
      */
-    public function get labelText():String
-    {
-        return _labelText;
+    public function get label():String
+    {
+        return _label;
     }

     /**
      *  @private
      */
-    public function set labelText(value:String):void
-    {
-        if (value != _labelText)
-            _labelText = value;
+    public function set label(value:String):void
+    {
+        if (value != _label)
+            _label = value;
         dispatchEvent(new FlexEvent("textChanged"));
     }

@@ -385,14 +353,14 @@
      */
     protected function getCurrentRendererState():String
     {
-    	if (selected && caret && hasState("selectedAndCaret"))
-    	   return "selectedAndCaret";
+    	if (selected && showsCaret && hasState("selectedAndShowsCaret"))
+    	   return "selectedAndShowsCaret";

-        if (hovered && caret && hasState("hoveredAndCaret"))
-            return "hoveredAndCaret";
+        if (hovered && showsCaret && hasState("hoveredAndShowsCaret"))
+            return "hoveredAndShowsCaret";

-        if (caret && hasState("normalAndCaret"))
-            return "normalAndCaret";
+        if (showsCaret && hasState("normalAndShowsCaret"))
+            return "normalAndShowsCaret";

         if (selected && hasState("selected"))
             return "selected";


fix comment to reflect reality

fix comment to reflect reality

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

--- src/as/com/threerings/util/NetUtil.as
+++ src/as/com/threerings/util/NetUtil.as
@@ -9,7 +9,7 @@
      * Convenience method to load a web page in the browser window without
      * having to worry about SecurityErrors in various conditions.
      *
-     * @return true if the url was unable to be loaded.
+     * @return true if the url was able to be loaded.
      */
     public static function navigateToURL (
             url :String, preferSameWindowOrTab :Boolean = true) :Boolean


Issue #200: Extract default widget min width/height constants.

--- src/com/esri/viewer/WidgetTemplate.as
+++ src/com/esri/viewer/WidgetTemplate.as
@@ -101,6 +101,10 @@

     private static const WIDGET_STOP_DRAG:String = "stopDrag";

+    private static const DEFAULT_MIN_WIDTH:Number = 200;
+
+    private static const DEFAULT_MIN_HEIGHT:Number = 100;
+
     private var _widgetId:Number;

     private var _widgetState:String;
@@ -522,8 +526,8 @@
         if (isWithinHorizontalBoundaries && isWithinVerticalBoundaries)
         {
             // if there is minWidth and minHeight specified on the container, use them while resizing
-            const minimumResizeWidth:Number = minWidth ? minWidth : 200;
-            const minimumResizeHeight:Number = minHeight ? minHeight : 100;
+            const minimumResizeWidth:Number = minWidth ? minWidth : DEFAULT_MIN_WIDTH;
+            const minimumResizeHeight:Number = minHeight ? minHeight : DEFAULT_MIN_HEIGHT;

             var deltaX:Number = xResizeEnd - xResizeStart;
             var deltaY:Number = yResizeEnd - yResizeStart;


Raised extension version to v1.3

Raised extension version to v1.3

--- actionscript/src/com/digitalstrawberry/nativeExtensions/anesounds/ANESounds.as
+++ actionscript/src/com/digitalstrawberry/nativeExtensions/anesounds/ANESounds.as
@@ -9,7 +9,7 @@

 	public class ANESounds
 	{
-		public static const VERSION:String = "1.2";
+		public static const VERSION:String = "1.3";
 		private static var _instance:ANESounds;

 		private var _extContext:ExtensionContext;


Issue 73; Handle radial gradient bounding box units that use fractions.


Transferred from the Adobe Open Source Subversion Repository

Revision: 13208
Author:   chaase@adobe.com
Date:     2009-12-23T21:49:14.524642Z

Log Message:
-----------
Dealt with my FIXMEs in the code. Some went away (no longer issues), some became TODOs (still issues, but nothing that we have to solve in this release), a couple were actually resolved in this change (like the bug filed/fixed: 24848).

QE notes: 10 failures in Mustella of tests that need to be changed. They're excluded for now and QE has local fixes.
Doc notes: None
Bugs: SDK-24848
Reviewer: Jason
Tests run: checkintests, Mustella (spark/effects, mx/effects)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransitionShaderInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/PropertyChanges.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/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Timeline.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/MoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectTargetFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/RemoveAction.as</path>

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as
@@ -198,7 +198,7 @@

         if (childPlayheadTime < prevPlayheadTime)
         {
-            // FIXME (chaase): Handle seeking back in time
+            // TODO (chaase): Handle seeking back in time
             // idea: Maybe once we get playing a sequence in reverse
             // working perfectly, seeking back in time should essentially
             // 'play' (with zero duration) the child effects in reverse until


Removed console.log from AS code

Removed console.log from AS code

--- src/RTMP.as
+++ src/RTMP.as
@@ -86,8 +86,6 @@

       setupCallbacks();
       setupGetters();
-
-      ExternalInterface.call('console.log', 'clappr rtmp 0.10.5');

       _triggerEvent('flashready');


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

--- frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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.
 //
 ////////////////////////////////////////////////////////////////////////////////