How is acctName created?

--- In [email protected], "fumeng5" <fume...@...> wrote:
>
> Ok, I see what you're saying. So here's the constructor for my component that 
> is responsible for all this:
> 
> public function CreateAcctDialog()
> {
>                       super();
>                       init();
> }
> 
> ...and init():
> 
> private function init():void
>               {               
>                       msgString = "<b>The account " + this.acctName + " has 
> been created </b>"
> }
> 
> and the last part: 
> content.htmlText = msgString;
> 
> This comes out as: The account null has been created. 
> 
> I thought the init() method would handle the proper setting of this var.....
>                       
> 
> --- In [email protected], "valdhor" <valdhorlists@> wrote:
> >
> > For the first part, you are setting the value of msgString during its 
> > declaration. At this point acctName will be null. You would need to declare 
> > msgString and then assign it in a creationComplete handler.
> > 
> > Secondly, you can't do this in ActionScript:
> > 
> > content.htmlText = "{msgString}"
> > 
> > You have to do this:
> > 
> > content.htmlText = msgString
> > 
> > The "{}" syntax is to bind a variable in MXML.
> > 
> > Also, For the above, the variable does not need to be bindable.


Reply via email to