flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Need help on https://issues.apache.org/jira/browse/FLEX-33813 (DataGrid goes blank)
Date Fri, 11 Oct 2013 14:44:00 GMT
Hi Maurice,

Thanks for digging into this.  ValidateNow() can fix a lot of things, but
it can also cause inefficiencies if the things it validates were going to
get invalidated shortly after.  I don't know if that is the case or not

If it were me (and it isn't) I would change the collectionChangeHandler to
set a flag and call updateCaretForDataProviderChange in updateDisplayList.
 InvalidateDisplayList is called in the collectionChangeHandler, and in
theory, stuff like contentHeight should be resolved by the time you get to

Last night I checked in a fix for another similar DG issue in a similar
way by deferring work to measure().


On 10/11/13 6:55 AM, "Maurice Amsellem" <maurice.amsellem@systar.com>

>Hi, I would like your help on a fix for
>https://issues.apache.org/jira/browse/FLEX-33813 (DataGrid goes blank
>when scrolled and content is reset)
>I managed to spot where the issue is:
>line 850:
>const gridViewLayout:GridViewLayout = centerGridView.gridViewLayout;
> const gridMaxVSP:Number = contentHeight - height;
>const centerContentHeight:Number =
> const centerMaxVSP:Number = centerContentHeight - centerGridView.height;
>const vsp:Number = (centerMaxVSP / gridMaxVSP) * value;
> centerGridView.verticalScrollPosition = vsp;
>=> contentHeight  is NaN so all computations fails and
>verticalScrollPosiiton is set to NaN, which clears all the renderers
>(goes blank)
>My assumption is that the Grid is not ready yet, so it's missing a
>validateNow() somewhere().
>Call chain: 
>=> Grid.updateCaretForDataProviderChange(event:CollectionEvent):void
>In Grid.updateCaretForDataProviderChange(): [line 5356],
>when managing RESET event in line 5448,
>if the caret is not found (which is the case, since all data is new),  we
>call directly 
>verticalScrollPosition = 0;
>=> I added validateNow() before the call, and it's fixed.
>Do you validate ? 
>Maurice Amsellem
>SYSTAR R&D - BusinessBridgeFX

View raw message