[
https://issues.apache.org/jira/browse/FLEX-13994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13648189#comment-13648189
]
Justin Mclean commented on FLEX-13994:
--------------------------------------
Changed offscreenExtraRowsTop to offscreenExtraRowsTop > 0 and checked into
develop. Stopping an RTE even if it occurred due to user error is still worth
while IMO. I run into this error once or twice as well.
> ListBase throws an exception due to lack of error checking
> ----------------------------------------------------------
>
> Key: FLEX-13994
> URL: https://issues.apache.org/jira/browse/FLEX-13994
> Project: Apache Flex
> Issue Type: Improvement
> Components: mx: List
> Affects Versions: Adobe Flex SDK 3.0 (Release)
> Environment: Affected OS(s): Windows
> Affected OS(s): Windows XP
> Browser: Internet Explorer 7.x
> Language Found: English
> Reporter: Adobe JIRA
> Priority: Minor
> Labels: easyfix
> Fix For: Adobe Flex SDK 3.0 (Release)
>
>
> Steps to reproduce:
> 1. Create a ListBox object
> 2. Dynamicaly load a dataProvider every so often
>
> Actual Results:
> ListBase throws an exception every once in a while
>
> Expected Results:
> No exception thrown
>
> Workaround (if any):
> None
> Description:
> In the file ListBase.as there is a function "makeRowsAndColumnsWithExtraRows"
> starting on line 1326.
> line 1337 reads:
> offscreenExtraRowsTop = Math.min(desiredExtraRowsTop,
> verticalScrollPosition);
> Every so often, and I'm not sure why, the value for verticalScrollPosition
> is set to -1 and so the value for offscreenExtraRowsTop is also -1.
> Line 1348 reads:
> var curY:Number = offscreenExtraRowsTop ?
> rowInfo[offscreenExtraRowsTop-1].y + rowHeight : 0;
> and should read:
> var curY:Number = (offscreenExtraRowsTop > 0) ?
> rowInfo[offscreenExtraRowsTop-1].y + rowHeight : 0;
> When verticalScrollPosition is set to -1 this causes the calculation
> (offscreenExtraRowsTop-1) on line 1348 to come out at -2 and an exception is
> thrown since -2 is not a valid entry in 'rowInfo.'
> If my proposed change to line 1348 was made then the exception would not be
> thrown because the calculation would not happen and the default value of 0
> would be returned.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira