flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Chira (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-34065) AdvancedDataGrid throws RTE #1009 when groupedColumns is set to null
Date Tue, 28 Jan 2014 11:04:37 GMT
Mihai Chira created FLEX-34065:

             Summary: AdvancedDataGrid throws RTE #1009 when groupedColumns is set to null
                 Key: FLEX-34065
                 URL: https://issues.apache.org/jira/browse/FLEX-34065
             Project: Apache Flex
          Issue Type: Bug
          Components: Advanced Data Grid
    Affects Versions: Apache Flex 4.11.0
            Reporter: Mihai Chira
             Fix For: Apache Flex 4.12.0

Steps to reproduce: when run, the following application throws "Error #1009: Cannot access
a property or method of a null object reference. at mx.controls::AdvancedDataGridBaseEx/commitProperties()..."

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:mx="library://ns.adobe.com/flex/mx"

* in our application this is happening because OLAPDataGrid.commitProperties() sets "groupedColumns
= []" when there are no column axes in the olap data.
* because AdvancedDataGrid relies on visibleHeaderInfos being null in some cases (see .drawHeaderHorizontalSeparators()),
it seems that the assumption made by AdvancedDataGridBaseEx.commitProperties() - that visibleHeaderInfos
cannot be null - is the one that needs to be changed. So the monkey patch we wrote until we
have a fix in the framework replaces

if (horizontalScrollPosition > visibleHeaderInfos.length)
                horizontalScrollPosition = visibleHeaderInfos.length - 1;


var noVisibleColumns:int = visibleHeaderInfos ? visibleHeaderInfos.length : 0;
            if (horizontalScrollPosition > noVisibleColumns)
                horizontalScrollPosition = noVisibleColumns == 0 ? noVisibleColumns : noVisibleColumns
- 1;

This message was sent by Atlassian JIRA

View raw message