Hi all,

 

 

            Can anybody tell me the reason why the method destroyUi is not being called out. Its not showing anyError. But the control is not going to LeftAccordian.mxml file’s  destroyUI method.

 

 

//LeftAccordian.mxml

 

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

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"

borderThickness="1" cornerRadius="5" dropShadow="true" fontFamily="Verdana" fontSize="18" fontStyle="normal" fontWeight="bold" creationComplete="createUI( 'formatToolBarPage' )" xmlns:accords="*">

 

 <mx:Model id="statesModel" source="states.xml"/>

 

    <mx:Script>

        <![CDATA[

            import mx.core.UIObject;

                                    import de.richinternet.utils.Dumper;

            public var pageItem : Object;

           

            function createUI( pageUI:String ):Void {

                if( pageUI == "formatToolBarPage" )

                                                {

                    pageItem = dashBoard.createChild( formatToolbar, undefined );

                                                           

                                                }

                if( pageUI == "pointsCalci" )

                                                {

                    pageItem = dashBoard.createChild( pointsCalculator, undefined );

                                                            //mx.controls.Alert(" Check "+pageItem);

                                                }          

            }

 

            public function destroyUI():Void {

                                        Dumper.dump("inside destroy");

                                                dashBoard.destroyChild( UIObject( pageItem ) );

            } 

                                   

                                    public function test():Void {

                                        Dumper.dump("inside test");                                               

            }        

        ]]>

    </mx:Script>

 

<mx:HBox id="dashBoard" width="766" height="493" hScrollPolicy="off" vScrollPolicy="off">

 

<mx:Accordion width="263" height="493"

             fillColors="[0x000033,0xFFFFFF]"  borderColor="#00CCFF" borderSides="" visible="true" mouseOverEffect="Move" barColor="#99CC33" borderStyle="inset" borderThickness="1">

           

            <!--Calculators Advisors-->

                        <mx:VBox label="Calculators Advisors" marginTop="20" width="245" height="338">

                                               

                        <mx:Link fontSize="10" fontWeight="bold" label="Should I Pay Points?" click="destroyUI();createUI('pointsCalci');"></mx:Link>

                                               

           

                        </mx:VBox>

 

</mx:HBox>

 

 

 

// pointCalculator.mxml

 

 

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

<mx:Canvas width="474" height="493" xmlns:mx="http://www.macromedia.com/2003/mxml"  backgroundColor="#225FB0" cornerRadius="5" borderStyle="solid" marginLeft="3" marginRight="3" fontSize="16" hScrollPolicy="off" vScrollPolicy="off" creationComplete="initReport();">

 

            <mx:Script>

    <![CDATA[

                        [Bindable]

        var leftAccord;

                        import de.richinternet.utils.Dumper;

                        function initReport():Void

                        {

                                   

                                    Dumper.dump("Inside initReport! ");

                                    var leftAccord:leftAccordian=new leftAccordian();

                                    Dumper.dump("After object intitialization ");

                                   

                                    return; 

        }

    ]]>

    </mx:Script>

           

  <mx:Label text="  Calculators : Should I Pay Points?" width="232" x="5" y="4" height="18" fontSize="11" fontWeight="bold" color="#FFFFFF" />

  <

  <mx:Link label="View Report" x="389" y="4" width="77" height="18" color="#FFFFFF" fontSize="10" fontWeight="bold"   

 

 mouseDown="{leftAccord.destroyUI();}"/> // this destroyUI() is not being called up. Why?

 

</mx:Canvas>

 

 

Thanks.

Akash

 

 

 

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
Disclaimer

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, please immediately notify the [EMAIL PROTECTED] and destroy the original message. The recipient should check this email and any attachments for the presence of viruses. Ness has taken every reasonable precaution to minimize this risk, and accepts no liability for any damage caused by any virus transmitted in this email. Ness reserves the rights to monitor and review the content of all messages sent to or from this E-mail address, and store them on the Ness E-mail system.

Reply via email to