flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Smith <gosm...@adobe.com>
Subject Re: Send parameter to mxml constructor
Date Thu, 26 Sep 2013 19:09:01 GMT
MXML does not support constructor parameters. You need to set a property,
as in

<my:Obj1 someProp="someValue"/>

Properties get set before children get created.

- Gordon

On 9/26/13 11:57 AM, "mark goldin" <markzolotoy@gmail.com> wrote:

>I have an mxml class called Obj1. Somewhere in my code I do:
>var _obj1 = new Obj1();
>What I need is to provide some variable to Obj1 for its initialization. A
>reason for that is because Obj1 has children that need that variable for
>their initialization.
>But because I cannot send a parameter to Obj1's constructor I dont know
>to solve my problem.
>Any idea?

View raw message