I forwarded it on

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel
Sent: Thursday, March 02, 2006 10:31 AM
To: [email protected]
Subject: [flexcoders] weird bug with IE and states Flex2

 

take this code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*" layout="absolute" >
    <mx:states>
        <mx:State name="PlannerMode">
            <mx:SetProperty target="{panel1}" property="x" value="27"/>
            <mx:SetProperty target="{panel1}" property="height" value="102"/>
            <mx:SetProperty target="{panel1}" property="width" value="766"/>
            <mx:SetProperty target="{panel2}" property="visible" value="false"/>
            <mx:SetProperty target="{panel3}" property="visible" value="false"/>
            <mx:SetProperty target="{panel4}" property="visible" value="false"/>
            <mx:SetProperty target="{panelPlanner}" property="visible" value="true"/>
            <mx:SetProperty target="{topText}" property="visible" value="false"/>
            <mx:SetProperty target="{topText}" property="includeInLayout" value="false"/>
            <mx:SetProperty target="{netWorthPlannerModeText}" property="visible" value="true"/>

            <mx:SetEventHandler target="{goAhead}" event="click" handler="showMainPage()"/>
            <mx:SetProperty target="{panelPlanner}" property="height" value="430"/>
        </mx:State>
    </mx:states>
    <mx:transitions>
        <mx:Transition fromState="*" toState="PlannerMode">
            <mx:Sequence>
                <mx:Parallel>                   
                    <mx:Sequence targets="{[panel2]}">
                        <mx:WipeDown showTarget="false"/>
                        <!-- this is required otherwise the endstate properties will not be
                            observed -->
                        <mx:SetPropertyAction property="visible" value="false"/>
                    </mx:Sequence>
                    <mx:Sequence startDelay="100" targets="{[panel3]}">
                        <mx:WipeDown showTarget="false"/>
                        <!-- this is required otherwise the endstate properties will not be
                        observed -->
                        <mx:SetPropertyAction property="visible" value="false"/>
                    </mx:Sequence>
                    <mx:Sequence startDelay="200" targets="{[panel4]}">
                        <mx:WipeDown showTarget="false"/>
                        <!-- this is required otherwise the endstate properties will not be
                        observed -->
                        <mx:SetPropertyAction property="visible" value="false"/>
                    </mx:Sequence>
                </mx:Parallel>
                <mx:Parallel>
                    <mx:Resize target="{panel1}"/>
                    <mx:Sequence target="{panelPlanner}">
                        <mx:SetPropertyAction property="visible"/>
                        <mx:WipeUp showTarget="true"  />
                                               
                    </mx:Sequence>           
                </mx:Parallel>
            </mx:Sequence>
        </mx:Transition>
        <mx:Transition fromState="PlannerMode" toState="*">
            <mx:Sequence>
                <mx:Parallel>
                    <mx:Resize target="{panel1}"/>
                    <mx:Sequence target="{panelPlanner}">
                        <mx:WipeDown showTarget="false"  />
                        <!-- this is required otherwise the endstate properties will not be
                        observed -->
                        <mx:SetPropertyAction property="visible" value="false"/>
                    </mx:Sequence>           
                </mx:Parallel>
                <mx:Parallel>
                    <mx:Sequence targets="{[panel2, panel3]}">
                        <mx:SetPropertyAction property="visible" value="true"/>
                        <mx:WipeUp showTarget="true"/>
                    </mx:Sequence>
                    <mx:Sequence targets="{[panel4]}">
                        <mx:SetPropertyAction property="visible" value="true"/>
                        <mx:WipeUp showTarget="true"/>
                    </mx:Sequence>
                </mx:Parallel>                   
            </mx:Sequence>
        </mx:Transition>
    </mx:transitions>
    <mx:Script>
        <![CDATA[
            internal function showGoalSetup() {
                try {
                    currentState="PlannerMode";
                }
                catch (e:Error) {
                    mx.controls.Alert.show("Exception (Error) received " + e ) ;   
                }
            }

            internal function showMainPage() {
                try {
                    currentState="";
                }
                catch (e:Error) {
                    mx.controls.Alert.show("Exception (Error) received " + e ) ;   
                }
            }
        ]]>
    </mx:Script>
    <mx:Panel x="27" y="33" width="766" height="333" layout="absolute" title="Hello, Adam"  id="panel1">
        <mx:Button id="goAhead" label="Go Ahead" click="showGoalSetup()">
           
        </mx:Button>
        <mx:Text y="{goAhead.y+goAhead.height}" id="topText">
            <mx:htmlText>
                This is a Text appears in the base state.
                It will disappear in the collapsed ("PlannerMode") state.
            </mx:htmlText>
        </mx:Text>
       
    </mx:Panel>
    <mx:Panel id="panelPlanner" x="27" y="143" width="766" height="435" layout="absolute" title="College Planning" visible="false" >
    </mx:Panel>   
    <mx:Panel x="27" y="374" width="250" height="200" layout="absolute" title="Net Worth"   id="panel2">
        <mx:Text width="90%" id="netWorthPlannerModeText" visible="false">
            <mx:text>
            This panel visible in the PlannerMode state because of a missing SetActionProperty
            even though the state to which the application is being transitioned to
            specifies that this panel should be invisible. The WipeDown effect somehow
            causes a problem.
            </mx:text>
        </mx:Text>
    </mx:Panel>
    <mx:Panel x="543" y="374" width="250" height="200" layout="absolute" id="panel4">
    </mx:Panel>
    <mx:Panel x="285" y="374" width="250" height="200" layout="absolute" id="panel3">
    </mx:Panel>
   
</mx:Application>

run as flex application in IE do the transition about 20 times and the player crashes. does not happen in firefox. the stack trace:
ArgumentError: Error #2015: Invalid image.
    at mx.graphics::RectangularDropShadow/mx.graphics:RectangularDropShadow::createShadowBitmaps ()
    at mx.graphics::RectangularDropShadow/drawShadow()
    at mx.skins.halo::HaloRectBorder/mx.skins.halo:HaloRectBorder::drawDropShadow()
    at mx.skins.halo::HaloRectBorder/mx.skins.halo:HaloRectBorder::updateDisplayList ()
    at mx.skins::ProgrammaticSkin/validateDisplayList()
    at mx.managers::LayoutManager/validateDisplayList()
    at mx.managers::LayoutManager/mx.managers:LayoutManager::doPhasedInstantiation()
    at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher2 ()
    at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher()


--
j:pn
http://www.lennel.org



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to