[ 
https://issues.apache.org/jira/browse/FLEX-33165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13719229#comment-13719229
 ] 

Justin Mclean commented on FLEX-33165:
--------------------------------------

OK managed to reproduce by calling method directly. Can see that this would 
happen if scrollbar were removed when changing orientation and snap mode wasn't 
"none".


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"; 
                           xmlns:s="library://ns.adobe.com/flex/spark" 
                           xmlns:mx="library://ns.adobe.com/flex/mx" 
creationComplete="init(event)">
        <fx:Script>
                <![CDATA[
                        import mx.core.mx_internal;
                        import mx.events.FlexEvent;
                        use namespace mx_internal;
                        
                        protected function init(event:FlexEvent):void
                        {
                                list.scroller.mx_internal::snapElement(10, 
false);
                        }                       
                ]]>
        </fx:Script>
        <fx:Declarations>
                <s:ArrayList id="listdata">
                        <fx:String>one</fx:String>
                        <fx:String>two</fx:String>
                        <fx:String>three</fx:String>
                        <fx:String>four</fx:String>
                        <fx:String>five</fx:String>
                        <fx:String>six</fx:String>
                        <fx:String>seven</fx:String>
                        <fx:String>eight</fx:String>
                        <fx:String>nine</fx:String>
                        <fx:String>ten</fx:String>
                        <fx:String>eleven</fx:String>
                        <fx:String>twelve</fx:String>
                </s:ArrayList>
        </fx:Declarations>
        
        <s:List id="list" dataProvider="{listdata}" width="100%" height="100%" 
verticalScrollPolicy="off" horizontalScrollPolicy="off" 
scrollSnappingMode="center">
                <s:layout>
                        <s:HorizontalLayout />
                </s:layout>
        </s:List>
        
</s:Application>

                
> RTE on Scroller when rotating device in mobile simulator
> --------------------------------------------------------
>
>                 Key: FLEX-33165
>                 URL: https://issues.apache.org/jira/browse/FLEX-33165
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: Scroller
>    Affects Versions: Adobe Flex SDK 4.6 (Release)
>            Reporter: Maurice Amsellem
>            Priority: Minor
>              Labels: EasyFix
>
> When rotating the mobile simulator (Menu Device>Rotate left or right), I get 
> the following error:
> {code}
> Error #1056: Cannot create property null on spark.components.DataGroup.
> at 
> spark.components::Scroller/http://www.adobe.com/2006/flex/mx/internal::snapElement()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Scroller.as:1571]
>       at 
> spark.components::Scroller/checkScrollPosition()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Scroller.as:1750]
>       at 
> spark.components::Scroller/handleSizeChange()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Scroller.as:1766]
>       at 
> spark.components::Scroller/handleSizeChangeOnUpdateComplete()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Scroller.as:2048]
> {code}
> In Scroller:1571     viewport[scrollProperty] = snapScrollPosition;
> scrollProperty is null, which trigger the RTE.
> Scroller belongs to a spark:List with HorizontalLayout and 
> verticalScrollPolicy style is set to ScrollPolicy.OFF.
> also, the RTE does not seem to occur on the real device, but maybe it is just 
> swallowed...

--
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

Reply via email to