You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Mark Saunders (JIRA)" <ji...@apache.org> on 2013/12/11 15:49:08 UTC

[jira] [Updated] (FLEX-33990) RTE in AdvancedDataGridBase drawItem

     [ https://issues.apache.org/jira/browse/FLEX-33990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Saunders updated FLEX-33990:
---------------------------------

    Description: 
The method drawItem() (line 897 of AdvancedDataGridBase) was modified in 4.11.  Line 916 was added:  r.validateDisplayList();
The issue is that r is null.  In the for loop, n is the length of visible columns, while r is derived from listitems[row][i].  The listItems inner array [i] only contains custom itemrenderers and is therefore a subset of the optimumColumns (visible columns).  I think an if(r) check will fix the issue.  This looks like a timing issue depending on when drawItems() is called.  In my app, about 50% of the time, I get the RTE when right after the advancedDataGrid is initialized.  See stack below.

var n:int = optimumColumns.length;
 for (var i:int = 0; i < n; i++)
        {
            var r:IListItemRenderer = listItems[rowIndex][i];
			r.validateDisplayList();
            updateDisplayOfItemRenderer(r);
        }
AT THIS POINT, listItems[0] has 4 elements representing my custom item renderers only (lengh = 4) while n:int = optimumColumns.length = 16
STACK:
mx.controls.advancedDataGridClasses::AdvancedDataGridBase/drawItem	
mx.controls.listClasses::AdvancedListBase/http://www.adobe.com/2006/flex/mx/internal::clearHighlight	
mx.controls.advancedDataGridClasses::AdvancedDataGridBase/http://www.adobe.com/2006/flex/mx/internal::clearHighlight	
mx.controls::AdvancedDataGrid/http://www.adobe.com/2006/flex/mx/internal::clearHighlight	
mx.controls.listClasses::AdvancedListBase/mouseOutHandler	
mx.controls::AdvancedDataGridBaseEx/mouseOutHandler	
mx.controls::AdvancedDataGrid/mouseOutHandler	



  was:
The method drawItem() (line 897 of AdvancedDataGridBase) was modified in 4.11.  Line 916 was added:  r.validateDisplayList();
The issue is that r is null.  in the for loop, n is the length of visible columns, while r is derived from listitems[row][i].  the listItems inner array [i] only contains cusom itemrenderers and is therefore a subset of the optimumColumns (visible columns).  I think an if(r) check will fix the issue.

var n:int = optimumColumns.length;
 for (var i:int = 0; i < n; i++)
        {
            var r:IListItemRenderer = listItems[rowIndex][i];
			r.validateDisplayList();
            updateDisplayOfItemRenderer(r);
        }


> RTE in AdvancedDataGridBase drawItem
> ------------------------------------
>
>                 Key: FLEX-33990
>                 URL: https://issues.apache.org/jira/browse/FLEX-33990
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: ADG:Display
>    Affects Versions: Apache Flex 4.11.0
>         Environment: Windows 7, Flashbuilder 4.7 (probably irrelevant)
>            Reporter: Mark Saunders
>            Priority: Minor
>              Labels: easyfix, patch
>             Fix For: Adobe Flex SDK Next
>
>
> The method drawItem() (line 897 of AdvancedDataGridBase) was modified in 4.11.  Line 916 was added:  r.validateDisplayList();
> The issue is that r is null.  In the for loop, n is the length of visible columns, while r is derived from listitems[row][i].  The listItems inner array [i] only contains custom itemrenderers and is therefore a subset of the optimumColumns (visible columns).  I think an if(r) check will fix the issue.  This looks like a timing issue depending on when drawItems() is called.  In my app, about 50% of the time, I get the RTE when right after the advancedDataGrid is initialized.  See stack below.
> var n:int = optimumColumns.length;
>  for (var i:int = 0; i < n; i++)
>         {
>             var r:IListItemRenderer = listItems[rowIndex][i];
> 			r.validateDisplayList();
>             updateDisplayOfItemRenderer(r);
>         }
> AT THIS POINT, listItems[0] has 4 elements representing my custom item renderers only (lengh = 4) while n:int = optimumColumns.length = 16
> STACK:
> mx.controls.advancedDataGridClasses::AdvancedDataGridBase/drawItem	
> mx.controls.listClasses::AdvancedListBase/http://www.adobe.com/2006/flex/mx/internal::clearHighlight	
> mx.controls.advancedDataGridClasses::AdvancedDataGridBase/http://www.adobe.com/2006/flex/mx/internal::clearHighlight	
> mx.controls::AdvancedDataGrid/http://www.adobe.com/2006/flex/mx/internal::clearHighlight	
> mx.controls.listClasses::AdvancedListBase/mouseOutHandler	
> mx.controls::AdvancedDataGridBaseEx/mouseOutHandler	
> mx.controls::AdvancedDataGrid/mouseOutHandler	



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)