|
Matt, Thanks.
You are correct. Copy and paste messed me up there. One
other side note if I may. So now that I am able to run some code based on
events like initialize any help on creating dynamic accoridions would be much
appreciated. I have another class called Folder that I am trying to
create accordions of. I currently have a mxml file for my accordion control
that I create several accordions of this type, but now I am trying to convert
that mxml to a action script class. Here is the code that I have. I
see an object on the screen, but there is only one accordion and there is no
title bar. Thanks Jeff class net.AccordionNavigation extends
mx.containers.Accordion { public
function AccordionNavigation() { mx.core.Application.alert("In
constructor"); addEventListener("initialize",mx.utils.Delegate.create(this,initNavigation)); addEventListener("creationComplete",mx.utils.Delegate.create(this,creationCompleteFunction)); } public
function initNavigation() { super.init(); mx.core.Application.alert("init"); width="100%"; height="100%"
; setStyle("headerHeight","0"); setStyle("marginBottom","0");
setStyle("marginLeft","0"); setStyle("marginRight","0");
setStyle("marginTop","0"); hScrollPolicy="off"
; vScrollPolicy="off"; this.createSegment(Folder,"","Users",""); this.createSegment(Folder,"","Users2",""); } } I have also tried to put the createSegment
call in the creationComplete. From: Matt Chotin
[mailto:[EMAIL PROTECTED] 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] 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 Links
|
- RE: [flexcoders] subclassing accordion control. Jeff Krueger
- RE: [flexcoders] subclassing accordion control. Matt Chotin
- Re: [flexcoders] subclassing accordion control. Manish Jethani
- RE: [flexcoders] subclassing accordion control. Jeff Krueger
- RE: [flexcoders] subclassing accordion control. Dirk Eismann
- RE: [flexcoders] subclassing accordion control. Jeff Krueger
- Re: [flexcoders] subclassing accordion control. Manish Jethani
- RE: [flexcoders] subclassing accordion control. Jeff Krueger

