Yes, we will keep running into this, and swap in UIComponents as needed.  I 
just don't want to take the time to fully swap out everything just-in-case.  
Do-as-you-go.

-Alex

On 10/24/19, 11:12 AM, "Yishay Weiss" <[email protected]> wrote:

    Good to know about mxtests. I made the change to fix layout problems in 
s:TabBar. The problem was
    
                            var child:IUIComponent = getChildAt(i);
                            if (child) // child is null for TextNodes
                                mw = Math.max(mw, 
child.getExplicitOrMeasuredWidth());
    
    from UIComponent was giving a run-time exception because the children were 
not UIComponents and didn’t have getExplicitOrMeasuredWidth();
    
    I think child was not null, as maybe you’d expect it to be. So we might run 
into these problems in other cases where non-IUIComponents are nested in 
UIComponents.
    
    
    
    From: Alex Harui<mailto:[email protected]>
    Sent: Thursday, October 24, 2019 7:41 PM
    To: [email protected]<mailto:[email protected]>; 
[email protected]<mailto:[email protected]>
    Subject: Re: [royale-asjs] branch develop updated: get MXTests to pass 
again. The change to use ListItemRenderer broke a lot of things. I'm surprised 
it worked in any configuration
    
    The MXTests use a relatively simple mx:List and mx:DataGrid.  They stopped 
working and started throwing exceptions.  I honestly have no idea how whatever 
test case you were working with worked for you.  The MXTests are now working 
again.  If you make a commit and they start to fail, please look to see if your 
commit is the cause.  Or run the following on your computer:
    
    ant mxtests-clean
    ant mxtests
    ant mxtests-js
    
    Right now, we are trying to re-use as much code as possible from Basic in 
the MX emulation.  That's mainly because it is mainly me coding the emulations 
and I only have so much time.  So, I think before your changes, mx:List was 
using a lot of Basic components internally.  I'm guessing that you were trying 
to fix having the event.target of a renderer event be a UIComponent.  That's 
fine.  But by introducing a UIComponent as an ItemRenderer in a tree of UIBase 
components (a List has a DataGroup, a DataGrid has an even deeper internal 
sub-DOM), a whole bunch of things were affected.
    
    -UIComponents expect their parents to be UIComponents
    -UIComponents default to being absolute positioned
    -Other code expects Renderers to be ISelectabieItemRenderer
    
    Those 3 expectations were broken by having ListItemRenderer as a child of 
Basic DataGroup/DataGridListArea/DataGridColumnList.  I created 
UIComponent-based DataGridListArea/DataGridColumnList and had to make more 
abstractions in the Basic DataGridViews.  And then the flashgraphics bug showed 
up as well.
    
    -Alex
    
    On 10/24/19, 4:36 AM, "Yishay Weiss" <[email protected]> wrote:
    
        Thanks for fixing this. Can you explain the problems you saw and how 
you fixed them?
    
        ________________________________
        From: [email protected] <[email protected]>
        Sent: Wednesday, October 23, 2019 10:11:05 PM
        To: [email protected] <[email protected]>
        Subject: [royale-asjs] branch develop updated: get MXTests to pass 
again. The change to use ListItemRenderer broke a lot of things. I'm surprised 
it worked in any configuration
    
        This is an automated email from the ASF dual-hosted git repository.
    
        aharui pushed a commit to branch develop
        in repository 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C1ad376fb139d431b642e08d758adc9a7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637075375760332056&amp;sdata=dsl%2BVlKXqYCIW2%2FqD67zq%2FelpwWNYZlcuaELr6dnNIc%3D&amp;reserved=0
    
    
        The following commit(s) were added to refs/heads/develop by this push:
             new 203f55e  get MXTests to pass again.  The change to use 
ListItemRenderer broke a lot of things.  I'm surprised it worked in any 
configuration
        203f55e is described below
    
        commit 203f55e1006532bb40767300900074cab7b6e58d
        Author: Alex Harui <[email protected]>
        AuthorDate: Wed Oct 23 12:10:44 2019 -0700
    
            get MXTests to pass again.  The change to use ListItemRenderer 
broke a lot of things.  I'm surprised it worked in any configuration
        ---
         .../org/apache/royale/html/beads/DataGridView.as   | 18 +++--
         .../org/apache/royale/html/beads/IDataGridView.as  |  3 +-
         .../org/apache/royale/html/beads/TreeGridView.as   | 13 ++--
         .../royale/html/beads/layouts/TreeGridLayout.as    |  8 +--
         .../MXRoyale/src/main/resources/defaults.css       | 29 +++++++-
         .../src/main/resources/mx-royale-manifest.xml      |  2 +
         .../MXRoyale/src/main/royale/MXRoyaleClasses.as    |  2 +
         .../controls/dataGridClasses/DataGridColumnList.as | 79 
++++++++++++++++++++++
         .../controls/dataGridClasses/DataGridListArea.as}  | 37 +++++-----
         .../royale/mx/controls/listClasses/ListBase.as     |  2 +-
         .../mx/controls/listClasses/ListItemRenderer.as    | 63 
++++++++++++++++-
         .../src/main/royale/mx/core/UIComponent.as         | 18 ++++-
         .../src/main/royale/mx/display/Graphics.as         | 22 +++---
         13 files changed, 239 insertions(+), 57 deletions(-)
    
        diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as
        index b2d37f8..7f77b65 100644
        --- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as
        +++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DataGridView.as
        @@ -23,15 +23,16 @@ package org.apache.royale.html.beads
                 import org.apache.royale.core.IBeadModel;
                 import org.apache.royale.core.IBeadView;
                 import org.apache.royale.core.IChild;
        +    import org.apache.royale.core.ILayoutChild;
             import org.apache.royale.core.IDataGrid;
                 import org.apache.royale.core.IDataGridModel;
                 import org.apache.royale.core.IDataGridPresentationModel;
        -       import org.apache.royale.core.IUIBase;
        +       import org.apache.royale.core.IParent;
        +    import org.apache.royale.core.IUIBase;
                 import org.apache.royale.core.ValuesManager;
                 import org.apache.royale.debugging.assert;
                 import org.apache.royale.events.Event;
                 import org.apache.royale.events.IEventDispatcher;
        -       import org.apache.royale.html.Container;
                 import org.apache.royale.html.DataGridButtonBar;
                 import org.apache.royale.html.beads.layouts.ButtonBarLayout;
                 import 
org.apache.royale.html.supportClasses.IDataGridColumnList;
        @@ -65,7 +66,7 @@ package org.apache.royale.html.beads
                                 }
    
                                 private var _header:DataGridButtonBar;
        -                       private var _listArea:Container;
        +                       private var _listArea:IUIBase;
    
                                 private var _lists:Array;
    
        @@ -81,7 +82,7 @@ package org.apache.royale.html.beads
                                  * The area used to hold the columns
                                  *
                                  */
        -                       public function get listArea():Container
        +                       public function get listArea():IUIBase
                                 {
                                         return _listArea;
                                 }
        @@ -106,6 +107,8 @@ package org.apache.royale.html.beads
                                  * @royaleignorecoercion 
org.apache.royale.core.IBead
                                  * @royaleignorecoercion 
org.apache.royale.core.IBeadModel
                                  * @royaleignorecoercion 
org.apache.royale.core.IChild
        +                        * @royaleignorecoercion 
org.apache.royale.core.ILayoutChild
        +                        * @royaleignorecoercion 
org.apache.royale.core.IUIBase
                                  * @royaleignorecoercion 
org.apache.royale.html.DataGrid
                                  */
                                 override protected function 
handleInitComplete(event:Event):void
        @@ -128,8 +131,8 @@ package org.apache.royale.html.beads
    
                         var listAreaClass:Class = 
ValuesManager.valuesImpl.getValue(host, "listAreaClass") as Class;
                         assert(listAreaClass != null,"listAreaClass for 
DataGrid must be set!")
        -                               _listArea = new listAreaClass() as 
DataGridListArea;
        -                               _listArea.percentWidth = 100;
        +                               _listArea = new listAreaClass() as 
IUIBase;
        +                               (_listArea as 
ILayoutChild).percentWidth = 100;
    
                                         createLists();
    
        @@ -218,6 +221,7 @@ package org.apache.royale.html.beads
                                  * @royaleignorecoercion 
org.apache.royale.core.IDataGridModel
                                  * @royaleignorecoercion 
org.apache.royale.core.IBead
                                  * @royaleignorecoercion 
org.apache.royale.core.IChild
        +                        * @royaleignorecoercion 
org.apache.royale.core.IParent
                                  * @royaleignorecoercion 
org.apache.royale.core.IDataGrid
                                  * @royaleignorecoercion 
org.apache.royale.core.IDataGridPresentationModel
                                  * @royaleignorecoercion 
org.apache.royale.html.supportClasses.IDataGridColumn
        @@ -261,7 +265,7 @@ package org.apache.royale.html.beads
                                                 
list.addEventListener('change',handleColumnListChange);
                                                 list.addBead(presentationModel 
as IBead);
    
        -                                       _listArea.addElement(list as 
IChild);
        +                                       (_listArea as 
IParent).addElement(list as IChild);
                                                 _lists.push(list);
                                         }
    
        diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/IDataGridView.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/IDataGridView.as
        index 7eeba64..6d56e16 100644
        --- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/IDataGridView.as
        +++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/IDataGridView.as
        @@ -20,7 +20,6 @@ package org.apache.royale.html.beads
         {
                 import org.apache.royale.core.IBeadView;
                 import org.apache.royale.core.IUIBase;
        -       import org.apache.royale.html.Container;
    
                 /**
                  *  The IDataGridView interface marks as a component as being 
the bead that
        @@ -34,7 +33,7 @@ package org.apache.royale.html.beads
                 public interface IDataGridView extends IBeadView
                 {
                         function get columnLists():Array;
        -               function get listArea():Container;
        +               function get listArea():IUIBase;
                         function get header():IUIBase;
                 }
         }
        diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TreeGridView.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TreeGridView.as
        index 1a5bb4c..f71e150 100644
        --- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TreeGridView.as
        +++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TreeGridView.as
        @@ -24,6 +24,8 @@ package org.apache.royale.html.beads
                 import org.apache.royale.core.IDataGridModel;
                 import org.apache.royale.core.IDataGridPresentationModel;
                 import org.apache.royale.core.IStrand;
        +    import org.apache.royale.core.ILayoutChild;
        +    import org.apache.royale.core.IParent;
                 import org.apache.royale.core.IUIBase;
                 import org.apache.royale.core.UIBase;
                 import org.apache.royale.core.ValuesManager;
        @@ -31,7 +33,6 @@ package org.apache.royale.html.beads
                 import org.apache.royale.html.supportClasses.Viewport;
                 import org.apache.royale.events.Event;
                 import org.apache.royale.events.IEventDispatcher;
        -       import org.apache.royale.html.Container;
                 import org.apache.royale.html.DataGridButtonBar;
                 import org.apache.royale.html.List;
                 import org.apache.royale.html.Tree;
        @@ -71,7 +72,7 @@ package org.apache.royale.html.beads
    
                         private var _strand:IStrand;
                         private var _header:DataGridButtonBar;
        -               private var _listArea:Container;
        +               private var _listArea:IUIBase;
    
                         private var _lists:Array;
    
        @@ -87,7 +88,7 @@ package org.apache.royale.html.beads
                          * The area used to hold the columns
                          *
                          */
        -               public function get listArea():Container
        +               public function get listArea():IUIBase
                         {
                                 return _listArea;
                         }
        @@ -138,6 +139,7 @@ package org.apache.royale.html.beads
                         /**
                          * @private
                          * @royaleignorecoercion 
org.apache.royale.core.IBeadModel
        +                * @royaleignorecoercion 
org.apache.royale.core.ILayoutChild
                          * @royaleignorecoercion 
org.apache.royale.core.IDataGridModel
                          * @royaleignorecoercion 
org.apache.royale.events.IEventDispatcher
                          * @royaleignorecoercion 
org.apache.royale.html.supportClasses.IDataGridColumn
        @@ -162,7 +164,7 @@ package org.apache.royale.html.beads
                                 sharedModel.headerModel = _header.model as 
IBeadModel;
    
                                 _listArea = new TreeGridListArea();
        -                       _listArea.percentWidth = 100;
        +                       (_listArea as ILayoutChild).percentWidth = 100;
    
                                 createColumns();
    
        @@ -258,6 +260,7 @@ package org.apache.royale.html.beads
                          * @private
                          * @royaleignorecoercion Class
                          * @royaleignorecoercion 
org.apache.royale.core.IDataGridModel
        +                * @royaleignorecoercion org.apache.royale.core.IParent
                          * @royaleignorecoercion 
org.apache.royale.html.supportClasses.IDataGridColumn
                  * @royaleignorecoercion 
org.apache.royale.core.IDataGridPresentationModel
                          */
        @@ -302,7 +305,7 @@ package org.apache.royale.html.beads
                                         column.addBead(new Viewport());
                                         column.addEventListener('change', 
handleColumnListChange);
    
        -                               _listArea.addElement(column);
        +                               (_listArea as 
IParent).addElement(column);
                                         _lists.push(column);
    
                                 }
        diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/TreeGridLayout.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/TreeGridLayout.as
        index bfa6fb2..d2a132f 100644
        --- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/TreeGridLayout.as
        +++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/TreeGridLayout.as
        @@ -19,12 +19,12 @@
         package org.apache.royale.html.beads.layouts
         {
                 import org.apache.royale.core.IBeadLayout;
        -    import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
        +       import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
                 import org.apache.royale.core.IStrand;
                 import org.apache.royale.core.IUIBase;
        -    import org.apache.royale.core.layout.EdgeData;
                 import org.apache.royale.core.UIBase;
        -    import org.apache.royale.core.ValuesManager;
        +       import org.apache.royale.core.ValuesManager;
        +       import org.apache.royale.core.layout.EdgeData;
                 import org.apache.royale.events.Event;
                 import org.apache.royale.events.IEventDispatcher;
                 import org.apache.royale.geom.Rectangle;
        @@ -128,7 +128,7 @@ package org.apache.royale.html.beads.layouts
                                 }
                                 var model:TreeGridModel = uiHost.model as 
TreeGridModel;
                                 var header:ButtonBar = (uiHost.view as 
TreeGridView).header as ButtonBar;
        -                       var contentArea:UIBase = (uiHost.view as 
TreeGridView).listArea;
        +                       var contentArea:UIBase = (uiHost.view as 
TreeGridView).listArea as UIBase;
                                 var displayedColumns:Array = (uiHost.view as 
TreeGridView).columnLists;
    
                                 var borderMetrics:EdgeData = 
(ValuesManager.valuesImpl as 
IBorderPaddingMarginValuesImpl).getBorderMetrics(_strand as IUIBase);
        diff --git 
a/frameworks/projects/MXRoyale/src/main/resources/defaults.css 
b/frameworks/projects/MXRoyale/src/main/resources/defaults.css
        index b66359c..6c246f0 100644
        --- a/frameworks/projects/MXRoyale/src/main/resources/defaults.css
        +++ b/frameworks/projects/MXRoyale/src/main/resources/defaults.css
        @@ -150,6 +150,7 @@ Container
                 IBeadLayout: 
ClassReference("org.apache.royale.html.beads.layouts.BasicLayout");
                 IViewport: 
ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
                 IViewportModel: 
ClassReference("org.apache.royale.html.beads.models.ViewportModel");
        +       align-items: flex-start;
         }
    
         DataGrid
        @@ -159,7 +160,10 @@ DataGrid
                 IBeadView: 
ClassReference("org.apache.royale.html.beads.DataGridView");
                 IBeadModel: 
ClassReference("org.apache.royale.html.beads.models.DataGridModel");
                 IBeadLayout: 
ClassReference("mx.controls.beads.layouts.DataGridLayout");
        -       columnClass: 
ClassReference("org.apache.royale.html.supportClasses.DataGridColumnList");
        +       columnClass: 
ClassReference("mx.controls.dataGridClasses.DataGridColumnList");
        +       columnContainerClass: 
ClassReference("org.apache.royale.html.DataGridButtonBar");
        +       columnLayoutClass: 
ClassReference("org.apache.royale.html.beads.layouts.ButtonBarLayout");
        +       listAreaClass: 
ClassReference("mx.controls.dataGridClasses.DataGridListArea");
    
                 background-color: #FFFFFF;
                 border: 1px solid #222222;
        @@ -167,6 +171,20 @@ DataGrid
                 height: 200px;
         }
    
        +DataGridColumnList {
        +       IBeadModel: 
ClassReference("org.apache.royale.html.beads.models.DataGridModel");
        +       border-style: none;
        +       background-color: #FFFFFF;
        +}
        +
        +DataGridListArea {
        +       background-color: #FFFFFF;
        +       IBeadLayout: 
ClassReference("org.apache.royale.html.beads.layouts.HorizontalLayout");
        +       IViewport: 
ClassReference("org.apache.royale.html.supportClasses.ScrollingViewport");
        +       IViewportModel: 
ClassReference("org.apache.royale.html.beads.models.ViewportModel");
        +       flex-grow: 1;
        +}
        +
         DateChooser
         {
                 IBeadView:   
ClassReference("org.apache.royale.html.beads.DateChooserView");
        @@ -216,6 +234,15 @@ List
                 IViewportModel: 
ClassReference("org.apache.royale.html.beads.models.ViewportModel");
         }
    
        +ListItemRenderer
        +{
        +       padding-top: 4px;
        +       padding-bottom: 4px;
        +       flex-shrink: 0;
        +       flex-grow: 1;
        +       cursor: pointer;
        +}
        +
         MenuBar {
                 IBeadModel: 
ClassReference("mx.controls.beads.models.MenuBarModel");
                 IBeadView:  
ClassReference("org.apache.royale.html.beads.ListView");
        diff --git 
a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml 
b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
        index 5fd17d5..d2932af 100644
        --- 
a/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
        +++ 
b/frameworks/projects/MXRoyale/src/main/resources/mx-royale-manifest.xml
        @@ -27,6 +27,8 @@
           <component id="ComboBox" class="mx.controls.ComboBox" />
           <component id="DataGrid" class="mx.controls.DataGrid" />
           <component id="DataGridColumn" 
class="mx.controls.dataGridClasses.DataGridColumn" />
        +  <component id="DataGridColumnList" 
class="mx.controls.dataGridClasses.DataGridColumnList" />
        +  <component id="DataGridListArea" 
class="mx.controls.dataGridClasses.DataGridListArea" />
                 <component id="DateChooser" class="mx.controls.DateChooser" />
                 <component id="Image" class="mx.controls.Image" />
                 <component id="Label" class="mx.controls.Label" />
        diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as 
b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
        index 19991fd..5216039 100644
        --- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
        +++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
        @@ -160,6 +160,8 @@ internal class MXRoyaleClasses
             import 
mx.controls.advancedDataGridClasses.AdvancedDataGridColumnList; 
AdvancedDataGridColumnList;
             import 
mx.controls.advancedDataGridClasses.AdvancedDataGridListArea; 
AdvancedDataGridListArea;
             import 
mx.controls.advancedDataGridClasses.AdvancedDataGridSingleSelectionMouseController;
 AdvancedDataGridSingleSelectionMouseController;
        +    import mx.controls.dataGridClasses.DataGridColumnList; 
DataGridColumnList;
        +    import mx.controls.dataGridClasses.DataGridListArea; 
DataGridListArea;
             import mx.controls.beads.AdvancedDataGridView; 
AdvancedDataGridView;
             import mx.controls.beads.DataGridView; DataGridView;
             import mx.controls.beads.layouts.AdvancedDataGridLayout; 
AdvancedDataGridLayout;
        diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridColumnList.as
 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridColumnList.as
        new file mode 100644
        index 0000000..565be0c
        --- /dev/null
        +++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridColumnList.as
        @@ -0,0 +1,79 @@
        
+////////////////////////////////////////////////////////////////////////////////
        +//
        +//  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
        +//
        +//      
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apache.org%2Flicenses%2FLICENSE-2.0&amp;data=02%7C01%7Caharui%40adobe.com%7C1ad376fb139d431b642e08d758adc9a7%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637075375760332056&amp;sdata=YAJTUuYT0uxoLfI%2B3PwoRBTJ1aHz7UR399sTUZaHNcM%3D&amp;reserved=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.
        +//
        
+////////////////////////////////////////////////////////////////////////////////
        +
        +package mx.controls.dataGridClasses
        +{
        +    import mx.controls.List;
        +    import org.apache.royale.html.supportClasses.IDataGridColumnList;
        +
        +    //--------------------------------------
        +    //  Events
        +    //--------------------------------------
        +
        +    /**
        +     *  @copy org.apache.royale.core.ISelectionModel#change
        +     *
        +     *  @langversion 3.0
        +     *  @playerversion Flash 10.2
        +     *  @playerversion AIR 2.6
        +     *  @productversion Royale 0.0
        +     */
        +    [Event(name="change", type="org.apache.royale.events.Event")]
        +
        +    /**
        +     *  The DataGridColumnList class is the List class used internally
        +     *  by DataGrid for each column.
        +     *
        +     *  @langversion 3.0
        +     *  @playerversion Flash 10.2
        +     *  @playerversion AIR 2.6
        +     *  @productversion Royale 0.0
        +     */
        +    public class DataGridColumnList extends List implements 
IDataGridColumnList
        +    {
        +        /**
        +         *  Constructor.
        +         *
        +         *  @langversion 3.0
        +         *  @playerversion Flash 10.2
        +         *  @playerversion AIR 2.6
        +         *  @productversion Royale 0.0
        +         */
        +        public function DataGridColumnList()
        +        {
        +            super();
        +            typeNames = "DataGridColumnList";
        +        }
        +
        +        /**
        +         *  The DataGridColumn for this list
        +         *
        +         *
        +         *  @toplevel
        +         *  @langversion 3.0
        +         *  @playerversion Flash 10.2
        +         *  @playerversion AIR 2.6
        +         *  @productversion Royale 0.9
        +         *
        +         *  @royalesuppresspublicvarwarning
        +         */
        +        public var columnInfo: DataGridColumn;
        +    }
        +
        +}
        diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/IDataGridView.as
 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridListArea.as
        similarity index 61%
        copy from 
frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/IDataGridView.as
        copy to 
frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridListArea.as
        index 7eeba64..3e20020 100644
        --- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/IDataGridView.as
        +++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridListArea.as
        @@ -16,25 +16,22 @@
         //  limitations under the License.
         //
         
////////////////////////////////////////////////////////////////////////////////
        -package org.apache.royale.html.beads
        +
        +package mx.controls.dataGridClasses
         {
        -       import org.apache.royale.core.IBeadView;
        -       import org.apache.royale.core.IUIBase;
        -       import org.apache.royale.html.Container;
        -
        -       /**
        -        *  The IDataGridView interface marks as a component as being 
the bead that
        -        *  can create the visual pieces for a 
org.apache.royale.html.DataGrid.
        -        *
        -        *  @langversion 3.0
        -        *  @playerversion Flash 10.2
        -        *  @playerversion AIR 2.6
        -        *  @productversion Royale 0.0
        -        */
        -       public interface IDataGridView extends IBeadView
        -       {
        -               function get columnLists():Array;
        -               function get listArea():Container;
        -               function get header():IUIBase;
        -       }
        +    import mx.core.Container;
        +
        +    public class DataGridListArea extends Container
        +    {
        +        public function DataGridListArea()
        +        {
        +            super();
        +            COMPILE::JS
        +            {
        +                typeNames = 'Container DataGridListArea';
        +            }
        +
        +        }
        +    }
        +
         }
        diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
        index 279b894..ae60a3a 100644
        --- 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
        +++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
        @@ -25,7 +25,6 @@ import mx.collections.IList;
         import mx.collections.ListCollectionView;
         import mx.collections.XMLListCollection;
         import mx.core.EdgeMetrics;
        -import mx.core.IFactory;
         import mx.core.IUIComponent;
         import mx.core.ScrollPolicy;
         import mx.core.UIComponent;
        @@ -40,6 +39,7 @@ import org.apache.royale.core.IChild;
         import org.apache.royale.core.IContainer;
         import org.apache.royale.core.IContainerBaseStrandChildrenHost;
         import org.apache.royale.core.IDataProviderItemRendererMapper;
        +import org.apache.royale.core.IFactory;
         import org.apache.royale.core.IItemRendererClassFactory;
         import org.apache.royale.core.ILayoutChild;
         import org.apache.royale.core.ILayoutHost;
        diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListItemRenderer.as
 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListItemRenderer.as
        index b6120c5..c59c64e 100644
        --- 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListItemRenderer.as
        +++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListItemRenderer.as
        @@ -22,18 +22,21 @@ package mx.controls.listClasses
         import mx.core.UIComponent;
         import mx.events.ListEvent;
    
        -import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
         import org.apache.royale.core.IBead;
         import org.apache.royale.core.IBeadView;
        +import org.apache.royale.core.IBorderPaddingMarginValuesImpl;
         import org.apache.royale.core.IChild;
         import org.apache.royale.core.IParent;
        +import org.apache.royale.core.ISelectableItemRenderer;
         import org.apache.royale.core.IStrand;
         import org.apache.royale.core.ValuesManager;
         import org.apache.royale.core.layout.EdgeData;
         import org.apache.royale.events.IEventDispatcher;
        +import org.apache.royale.events.ItemClickedEvent;
         import org.apache.royale.events.MouseEvent;
         import org.apache.royale.html.supportClasses.StringItemRenderer;
         import org.apache.royale.html.util.getLabelFromData;
        +
         COMPILE::SWF
         {
             import flash.text.TextFieldAutoSize;
        @@ -50,7 +53,7 @@ COMPILE::SWF
          *  @productversion Flex 3
          */
    
        -public class ListItemRenderer extends UIComponent implements 
IListItemRenderer
        +public class ListItemRenderer extends UIComponent implements 
IListItemRenderer, ISelectableItemRenderer
         {
             public function ListItemRenderer()
             {
        @@ -63,6 +66,11 @@ public class ListItemRenderer extends UIComponent 
implements IListItemRenderer
                     textField.selectable = false;
                     textField.parentDrawsBackground = true;
                 }
        +        COMPILE::JS
        +        {
        +            typeNames = "ListItemRenderer";
        +            isAbsolute = false;
        +        }
             }
    
             COMPILE::SWF
        @@ -208,6 +216,12 @@ public class ListItemRenderer extends UIComponent 
implements IListItemRenderer
                 le.columnIndex = 0;
                 le.itemRenderer = this;
                 getComponentDispatcher().dispatchEvent(le);
        +        // not sure why this doesn't use ItemRendererMouseController
        +        // selection controller is looking for clicked
        +        var ice:ItemClickedEvent = new ItemClickedEvent("itemClicked");
        +        ice.index = rowIndex;
        +        ice.data = data;
        +        dispatchEvent(ice);
             }
    
             private var _itemRendererParent:Object;
        @@ -306,7 +320,10 @@ public class ListItemRenderer extends UIComponent 
implements IListItemRenderer
                     }
                     return getLabelFromData(this,value);
                 }
        -                        private var _data:Object;
        +
        +    private var _data:Object;
        +    private var _listData:Object;
        +    private var _index:int;
    
             [Bindable("__NoChangeEvent__")]
             /**
        @@ -329,6 +346,46 @@ public class ListItemRenderer extends UIComponent 
implements IListItemRenderer
                 text = dataToString(value);
             }
    
        +    [Bindable("__NoChangeEvent__")]
        +    /**
        +     *  The extra data being represented by this itemRenderer. This 
can be something simple like a String or
        +     *  a Number or something very complex.
        +     *
        +     *  @langversion 3.0
        +     *  @playerversion Flash 10.2
        +     *  @playerversion AIR 2.6
        +     *  @productversion Royale 0.0
        +     */
        +    public function get listData():Object
        +    {
        +        return _listData;
        +    }
        +
        +    public function set listData(value:Object):void
        +    {
        +        _listData = value;
        +    }
        +
        +    [Bindable("__NoChangeEvent__")]
        +    /**
        +     *  The index being represented by this itemRenderer. This can be 
something simple like a String or
        +     *  a Number or something very complex.
        +     *
        +     *  @langversion 3.0
        +     *  @playerversion Flash 10.2
        +     *  @playerversion AIR 2.6
        +     *  @productversion Royale 0.0
        +     */
        +    public function get index():int
        +    {
        +        return _index;
        +    }
        +
        +    public function set index(value:int):void
        +    {
        +        _index = value;
        +    }
        +
             public function get nestLevel():int
             {
                 throw new Error("Method not implemented.");
        diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
        index 1da127f..98c7add 100644
        --- 
a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
        +++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
        @@ -736,6 +736,12 @@ public class UIComponent extends UIBase
                     return _graphics;
                 }
    
        +        COMPILE::SWF
        +        public function get flashgraphics():flash.display.Graphics
        +        {
        +            return super.graphics;
        +        }
        +
             COMPILE::JS{
                 private var _mask:UIComponent;
                          public function set mask(value:UIComponent):void
        @@ -1903,14 +1909,20 @@ COMPILE::JS
                 _mxmlDocument = value;
             }
    
        +    /**
        +     * If the component is going to be used in an absolute positioning 
layout
        +     */
        +    COMPILE::JS
        +    protected var isAbsolute:Boolean = true;
    
             override public function addedToParent():void
             {
                 COMPILE::JS
                 {
        -            // Flex layouts don't use percentages the way the browser
        -            // does, so we have to absolute position everything.
        -            element.style.position = "absolute";
        +            if (isAbsolute)
        +                // Flex layouts don't use percentages the way the 
browser
        +                // does, so we have to absolute position everything.
        +                element.style.position = "absolute";
                 }
                 super.addedToParent();
    
        diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as
        index 01aa824..7caee4f 100644
        --- 
a/frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as
        +++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/display/Graphics.as
        @@ -55,7 +55,7 @@ package mx.display
                     fillInProgress = false;
                     COMPILE::SWF
                     {
        -                displayObject.graphics.clear();
        +                displayObject.flashgraphics.clear();
                     }
                     COMPILE::JS
                     {
        @@ -76,7 +76,7 @@ package mx.display
                 {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.beginFill(color, alpha);
        +                displayObject.flashgraphics.beginFill(color, alpha);
                     }
                     COMPILE::JS
                     {
        @@ -95,7 +95,7 @@ package mx.display
                         {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.endFill();
        +                displayObject.flashgraphics.endFill();
                     }
                     COMPILE::JS
                     {
        @@ -189,7 +189,7 @@ package mx.display
                         {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.lineStyle(thickness, color, 
alpha);
        +                displayObject.flashgraphics.lineStyle(thickness, 
color, alpha);
                     }
                     COMPILE::JS
                     {
        @@ -203,7 +203,7 @@ package mx.display
                         {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.moveTo(x, y);
        +                displayObject.flashgraphics.moveTo(x, y);
                     }
                     COMPILE::JS
                     {
        @@ -217,7 +217,7 @@ package mx.display
                         {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.lineTo(x, y);
        +                displayObject.flashgraphics.lineTo(x, y);
                     }
                     COMPILE::JS
                     {
        @@ -231,7 +231,7 @@ package mx.display
                         {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.curveTo(controlX, controlY, 
anchorX, anchorY);
        +                displayObject.flashgraphics.curveTo(controlX, 
controlY, anchorX, anchorY);
                     }
                     COMPILE::JS
                     {
        @@ -248,7 +248,7 @@ package mx.display
                 {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.drawEllipse(x, y, width, 
height);
        +                displayObject.flashgraphics.drawEllipse(x, y, width, 
height);
                     }
                     COMPILE::JS
                     {
        @@ -279,7 +279,7 @@ package mx.display
                 {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.drawRoundRect(x, y, width, 
height, radiusX, radiusY);
        +                displayObject.flashgraphics.drawRoundRect(x, y, width, 
height, radiusX, radiusY);
                     }
                     COMPILE::JS
                     {
        @@ -315,7 +315,7 @@ package mx.display
                 {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.drawRect(x, y, width, height);
        +                displayObject.flashgraphics.drawRect(x, y, width, 
height);
                     }
                     COMPILE::JS
                     {
        @@ -346,7 +346,7 @@ package mx.display
                 {
                     COMPILE::SWF
                     {
        -                displayObject.graphics.drawCircle(x, y, radius);
        +                displayObject.flashgraphics.drawCircle(x, y, radius);
                     }
                     COMPILE::JS
                     {
    
    
    
    

Reply via email to