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

Judah Frangipane updated FLEX-35019:
------------------------------------
    Description: 
When dragging and dropping, a "Type Error #1010 A term is undefined and has no 
properties" occurs sometimes when dragging over multiple rows. 

It may only happen with the NativeDragManager or may not. I haven't pinned it 
down. I've attached screen shots. 

It happens on Line 2782 in mx.controls.Tree: 

        var topItem:Object = (rowNum > _verticalScrollPosition && rowNum <= 
numItems) ? 
                                                 listItems[rowNum - 
_verticalScrollPosition - 1][0].data : null;

This item: 

        listItems[rowNum - _verticalScrollPosition - 1]

contains no items. 

The solution may be to check if the array has a length: 

    if ((rowNum > _verticalScrollPosition && rowNum <= numItems) && 
         listItems[rowNum - _verticalScrollPosition - 1].length ) {
        var topItem:Object = listItems[rowNum - _verticalScrollPosition - 
1][0].data;
    }

but that may only prevent the error and not be the root of the problem. 


  was:
When dragging and dropping, an error occurs sometimes when dragging over 
multiple rows. It may happen with the NativeDragManager or may not. I haven't 
pinned it down. 




> Tree Error in updateDropData
> ----------------------------
>
>                 Key: FLEX-35019
>                 URL: https://issues.apache.org/jira/browse/FLEX-35019
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: Tree
>    Affects Versions: Apache Flex 4.15.0
>            Reporter: Judah Frangipane
>         Attachments: Screen Shot 2016-01-22 at 4.19.23 PM.png, Screen Shot 
> 2016-01-22 at 4.19.58 PM.png, Screen Shot 2016-01-22 at 4.21.59 PM.png
>
>
> When dragging and dropping, a "Type Error #1010 A term is undefined and has 
> no properties" occurs sometimes when dragging over multiple rows. 
> It may only happen with the NativeDragManager or may not. I haven't pinned it 
> down. I've attached screen shots. 
> It happens on Line 2782 in mx.controls.Tree: 
>         var topItem:Object = (rowNum > _verticalScrollPosition && rowNum <= 
> numItems) ? 
>                                                listItems[rowNum - 
> _verticalScrollPosition - 1][0].data : null;
> This item: 
>         listItems[rowNum - _verticalScrollPosition - 1]
> contains no items. 
> The solution may be to check if the array has a length: 
>     if ((rowNum > _verticalScrollPosition && rowNum <= numItems) && 
>          listItems[rowNum - _verticalScrollPosition - 1].length ) {
>         var topItem:Object = listItems[rowNum - _verticalScrollPosition - 
> 1][0].data;
>     }
> but that may only prevent the error and not be the root of the problem. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to