History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-16797
Type: Bug Bug
Status: Closed Closed
Resolution: Not a Bug
Priority: C C
Assignee: Ella Mitelman
Reporter: Ella Mitelman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Flex SDK

RTE when Group if rotated if the Group is inside of the Scroller

Created: 09/10/08 06:18 PM   Updated: 10/29/08 08:00 PM
Component/s: Spark: Scroller
Security Level: Public (All JIRA Users )

File Attachments: 1. File DataGroupStrings.mxml (1 kb)
2. File DataGroupStrings.swf (247 kb)
3. File GroupStrings.mxml (1.0 kb)
4. File GroupStrings.swf (289 kb)
5. File RotateGroupButtonsVert.mxml (5 kb)
6. File RotateGroupButtonsVert.swf (243 kb)
7. File verdana.ttf (168 kb)


Severity: Runtime Error
Reproducibility: Every Time
Discoverability: Medium
Found in Version: SDK Gumbo Iteration 8
Milestone: SDK Gumbo Iteration 8
Affected OS(s): All OS Platforms
Steps to Reproduce:
Steps to reproduce:
1.Run attached file
2.Click "rotate" button
 
 Actual Results:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at flash.geom::Matrix/deltaTransformPoint()
at flex.graphics::TransformUtil$/transformBounds()
at flex.layout::LayoutItemUIC/setActualSize()
at flex.skin::ScrollerSkin/updateDisplayList()
at mx.core::UIComponent/validateDisplayList()
at mx.managers::LayoutManager/validateDisplayList()
at mx.managers::LayoutManager/doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()
at mx.core::UIComponent/callLaterDispatcher()
 
 Expected Results:
 no RTE
 
 Workaround (if any):
 
 
 
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: No
QA Owner: Ella Mitelman
Resolved by: Hans Muller
Fixed Version: SDK Gumbo Iteration 8 - Next Build
Participants: Ella Mitelman, Evtim Georgiev and Hans Muller


 All   Comments      Sort Order:
Ella Mitelman - [09/10/08 06:21 PM ]
Scroller itself rotates correctly

Hans Muller - [09/29/08 06:37 PM ]
I used a slightly revised version of the test app:


<?xml version="1.0" encoding="utf-8"?>

<Application
    xmlns="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library:adobe/flex/halo">

    <Scroller width="100" height="100" id="sc" x="100" y="100">
        <DataGroup id="g2" width="200">
            <layout>
                <VerticalLayout/>
            </layout>
            <mx:ArrayCollection>
            <mx:String>Ella1</mx:String>
            <mx:String>Paul1</mx:String>
            <mx:String>Tom1</mx:String>
            <mx:String>Ella2</mx:String>
            <mx:String>Paul2</mx:String>
            <mx:String>Tom2</mx:String>
            <mx:String>Ella3</mx:String>
            <mx:String>Paul3</mx:String>
            <mx:String>Tom3</mx:String>
            <mx:String>Ella</mx:String>
            <mx:String>Paul</mx:String>
            <mx:String>Tom </mx:String>
            </mx:ArrayCollection>
        </DataGroup>
    </Scroller>
    
    <Button label="rotation" click = "g2.rotation=-15" />

</Application>
    

The source of the problem is a null-reference through the bounds argument
from TransformUtil::transformBounds():

        var pt1:Point = matrix.deltaTransformPoint(bounds); // bounds is null!
        
The source of the null value seems to be TransformUtil::calcUBoundsToFitTBounds(),
which can return null if no solution is possible.



Ella Mitelman - [10/01/08 05:48 PM ]
RTE is gone, but there still 2 problems.
DataGroup data disappears after rotation,
Group Scrollbar disappears after rotation.
New files are attached

Hans Muller - [10/06/08 10:34 AM ]
<?xml version="1.0" encoding="utf-8"?>
<!--
http://bugs.adobe.com/jira/browse/SDK-16797

If the Scroller's viewport (a DataGroup in this case) is rotated is
does inexplicably disappear. It's not entirely clear why this is
however if an additional Group is added around the DataGroup
then things work about as you'd expect.

-->

<Application
    xmlns="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library:adobe/flex/halo">
    
    <layout>
        <VerticalLayout gap="20"/>
    </layout>
    
    <Script>
        <![CDATA[
         
        import flash.display.DisplayObject;
        import flex.graphics.graphicsClasses.GraphicElement;
        import flex.skin.DefaultComplexItemRenderer;
        import flex.skin.DefaultItemRenderer;
        
        public function mixItemRendererFunction(item:*):IFactory
        {
            if (item is DisplayObject || item is GraphicElement)
                return new ClassFactory(DefaultComplexItemRenderer);
            else
                return new ClassFactory(DefaultItemRenderer);
        }
        
        ]]>
    </Script>
    
    <Scroller height="150">
        <Group>
            <DataGroup id="dg"
                transformX="100"
                transformY="125"
                itemRendererFunction="mixItemRendererFunction">
                <layout>
                    <VerticalLayout/>
                </layout>

                <mx:ArrayCollection>
                    <mx:String>Ella1</mx:String>
                    <mx:String>Paul1</mx:String>
                    <mx:String>Tom1</mx:String>
                    <mx:String>Ella2</mx:String>
                    <mx:String>Paul2</mx:String>
                    <mx:String>Tom2</mx:String>
                    <mx:String>Ella3</mx:String>
                    <mx:String>Paul3</mx:String>
                    <mx:String>Tom3</mx:String>
                    <mx:String>Ella</mx:String>
                    <mx:String>Paul</mx:String>
                    <mx:String>Tom </mx:String>
                </mx:ArrayCollection>

            </DataGroup>
        </Group>
    </Scroller>

    <Button label="set rotation" click = "dg.rotation -= 3"/>

</Application>


Hans Muller - [10/06/08 10:36 AM ]
Note also: rotating the entire Scroller (not just its viewport) also works correctly, with or without the extra Group.


Hans Muller - [10/06/08 01:36 PM ]

The problem here seems to be that ScrollerSkin::updateDisplayList()
is setting the viewport LayoutItem's actual size to its pre-transform value,
even though LayoutItem::setActualSize() defines the layout item's
post-transform size. As a consequence of this,
VerticalLayout::updateDisplayList() is applied to an unscaledWidth
that's much to small, and when the scrollRect is set to that, the
list's contents disappear.

Although this is fixable, doing so is not a high priority. For now
we'll document that setting the viewport's transform isn't supported.
This bug's priority should be lowered.

Ella Mitelman - [10/06/08 01:39 PM ]
Priority is lowered to C

Hans Muller - [10/29/08 07:57 PM ]
We've decided to just document this limitation rather than fix it. Added the following comment to FxScroller::set viewport

     * Scroller does not support rotating the viewport directly. The viewport's
     * contents can be transformed arbitrarily but the viewport itself can not.