Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure what exactly the cause of your problem is, but here are a couple of thoughts that should help.</p> <ol> <li><p>You need to start your constructor with a super() statement. </p> <pre> public function AccordionWindow(list:Array) { super(); <pre><code> // any other code you might have in your constructor. // generally, you'll want to store arguments in instance properties. // maybe something like this: this.list = list; </code></pre> } </pre></li> </ol> <p>Sorry - don't know why I'm having so much trouble with the code formatting...</p> <ol start="2"> <li><p>Based on the code you posted, it looks like the AccordionWindow class is intended to create an Accordion and put it in a Box. Maybe you have a specific need to do things the way you are trying to do them, but in my experience it would make better sense to extend Box, rather than UIComponent.</p></li> <li><p>You'll tend to run into issues creating children and adding them to the stage in the constructor. Instead, override the protected createChildren method and move all of the code you currently have in your constructor to that method.</p></li> </ol> <p>createChildren is called automatically, so you don't have to do anything more than override it and move your code into it.</p> <pre><code>override protected function createChildren():void { super.createChildren(); // very important. do not leave this out. // paste the code that is currently in the constructor here } </code></pre> <p>There is a very helpful post about the UIComponent lifecycle at <a href="http://danorlando.com/?p=122" rel="nofollow noreferrer">http://danorlando.com/?p=122</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload