Thanks for your responses. 

What I mean is that in the 1st case:
content.htmlText = "<b>The account " + this.acctName + " has been created</b>."

...the message comes out to be: The account null has been created. However, I 
can use the debugger to see that acctName is definitely being set correctly. 

And in the second case:
[Bindable]
private var msgString:String = "<b>The account " + this.acctName + " hasbeen 
created </b>.

content.htmlText = "{msgString}"

...the message comes out to be: {msgString}

Now I'm not setting 'msgString' right away. I build it in the setter for 
acctName, as in:
[Bindable]
private var msgString:String;
                
public function set acctName(s:String):void{
_acctName = s;
msgString = "<b>The account " + _acctName + " has been created </b>"
}
[Bindable]
public function get acctName():String{
        return _acctName;
}

I'm pretty sure this should be working and I must be missing something small. 
Thank you for your help, it's very appreciated.



--- In flexcoders@yahoogroups.com, Pedro Sena <sena.pe...@...> wrote:
>
> try
> 
> [Bindable]
> private var msgString:String = "<b>The account " + this.acctName + " has
> been created </b>.
> 
> content.htmlText = "{msgString}"
> 
> and make sure your acctName is not blank.
> 
> On Thu, Apr 30, 2009 at 9:55 AM, valdhor <valdhorli...@...>wrote:
> 
> >
> >
> > What do you mean by "That didn't work"?
> >
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> > "fumeng5" <fumeng5@> wrote:
> > >
> > > Hi --
> > >
> > > I want to output a variable and hardcoded text in the htmlText property
> > of a Text component.
> > >
> > > Here's what I tried first:
> > >
> > > content.htmlText = "<b>The account " + this.acctName + " has been created
> > </b>."
> > >
> > > ('acctName' is a private var that has accessor methods to get/set it.)
> > >
> > > That didn't work, so I read thru the archives and found a solution that
> > didn't work either.
> > >
> > > [Bindable]
> > > private var msgString:String = "<b>The account " + {acctName} + " has
> > been created </b>.
> > >
> > > content.htmlText = "{msgString}"
> > >
> > > What am I missing here? Can anyone offer any helpful pointers?
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> /**
> * Pedro Sena
> * Systems Architect
> * Sun Certified Java Programmer
> * Sun Certified Web Component Developer
> */
>


Reply via email to