Are you calling super.createChildren within your override?


On Jan 8, 2008, at 4:15 AM, learner wrote:

custom Panel class:

class myPanel extends Panel{

      override protected function createChildren():void
        {
            // Add  button to Header
        }
}


in mxml

<local:myPanel>
      <local:Vlist> // adding a vlist's instance.
</local:myPanel>




custom class :

class Vlist extends UIComponent{
   //  overriding few methonds like create children
}



Does this helps






On Jan 7, 2008 9:34 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

Please post some of your code.


From: [email protected] [mailto:[email protected] ] On Behalf Of learner
Sent: Monday, January 07, 2008 1:47 AM
To: [email protected]
Subject: [flexcomponents] UIcomponent and Container


Hi all,
The scenario is like this:
I have one class which extends the Panel class. I create it's instance in an mxml file.
 I have one more class which extends a UIComponent Class.
Whilte trying to add a instance of this class to a instance of extended Panel class in mxml file. I get a error like can not convert UIComponent to Container.

I understood this, as Panel internally extends Container class ans Container class extends UIComponent .

But why i dont get this error when I try to add standard UIcomponent like Button etc. to standard Panel.??

Can somebody explain me this?
Regards
PS









Reply via email to