On 5/7/07, dorkie dork from dorktown <[EMAIL PROTECTED]> wrote:
>  I created a MXML component that someone is trying to create dynamically in
> AS3. They said, "the constructor requires an object as its argument. What
> are the properties of this object?"
>
> Since MXML components do not have constructor what do I tell him?

Did *you* create the component? If yes, what value are you accepting
in the constructor?

You can make the contructor args optional and expose public property
for the same.

For example:

  public function MyComponent(label:String = null /* optional */) {
    _label = label;
  }

  public function set label(value:String):void {
    _label = value;
  }

Obviously you can make label bindable, call invalidateProperties() in
the setter, etc., but I assume you already know that.

Reply via email to