I don’t think you have a reference to your parent in the constructor.  Use another function like commitProperties().  Also I assume it’s intentional that you’re listening for your parent’s events, not your own?

 

Matt

 


From: Jeff Krueger [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 22, 2005 4:47 PM
To: [email protected]
Subject: [flexcoders] subclassing accordion control.

 

All,

 

            I am trying to create a subclass of the accordion control.  I am having problems getting any of the events listening to work.  In the simplest form below the only alert message I get is the “In Constructor”.  Any ideas why the initialize or creationComplete events don’t fire.

 

Thanks

 

Jeff

 

[Event("accordionChanged")]

[Event("itemClicked")]

 

class net.crownmedia.common.component.AccordionNavigation extends mx.containers.Accordion

{

            public var dataProvider:Object;

           

            public function AccordionNavigation()

            {

                        mx.core.Application.alert("In constructor");                      

                        parent.addEventListener("initialize",mx.utils.Delegate.create(this,initNavigation));

                        parent.addEventListener("creationComplete",mx.utils.Delegate.create(this,creationCompleteFunction));

            }

           

            public function initNavigation()

            {

                        mx.core.Application.alert("Initialize");

            }

            public function creationCompleteFunction()

            {

                        mx.core.Application.alert("Creation Complete");

            }

}

 

 




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to