Tamás Nepusz created FLEX-34210:
-----------------------------------

             Summary: RTE in GridColumnHeaderGroup when the user clicks on the 
header of a DataGrid with no columns
                 Key: FLEX-34210
                 URL: https://issues.apache.org/jira/browse/FLEX-34210
             Project: Apache Flex
          Issue Type: Bug
          Components: Spark: Grid
    Affects Versions: Apache Flex 4.12.0, Apache Flex 4.11.0
         Environment: Mac OS X 10.9.2; probably affects all other platforms as 
well
            Reporter: Tamás Nepusz
            Priority: Minor


Steps to reproduce:

1. Create a new WindowedApplication with a single DataGrid in it. The DataGrid 
should not have columns or a data provider.

2. Start the application.

3. Click on the header row of the DataGrid, anywhere above the thin black 
separator line within the component)

Observed result:

TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
        at 
spark.components::GridColumnHeaderGroup/getHeaderRendererAt()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as:921]
        at 
spark.components::GridColumnHeaderGroup/dispatchGridEvent()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as:1266]
        at 
spark.components::GridColumnHeaderGroup/gchg_mouseDownDragUpHandler()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/spark/src/spark/components/GridColumnHeaderGroup.as:1112]
        at 
Function/<anonymous>()[/Users/justinmclean/Documents/ApacheFlex4.11.0/frameworks/projects/spark/src/spark/utils/MouseEventUtil.as:104]

Expected result:

Nothing should have happened.

The problem lies in GridColumnHeaderGroup.getHeaderRendererAt() where 
getColumnHeaderViewAtIndex() returns null, which is not anticipated by the line 
immediately below it. Note that several other methods in GridColumnHeaderGroup 
have the same problem (e.g., getHeaderBounds).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to