Binding is the only way to "declaratively" set up expressions that get
evaluated.

 

You can use script as well:

 

<mx:Label id="foo" initialize="foo.text=value + anotherValue"/>



 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of kramus0
Sent: Thursday, October 18, 2007 2:04 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] String concat in MXML (with using @Resource)

 

Hi all,

I have a simple question regarding text values in mxml files. Is it
possible to concat string values in a mxml text or label property?

So something like this:

<mx:Label text="'Value' + 'AnotherValue'"/>

I know that it doesn't work because it uses it as a hole string and
the single strings are not concatenated at all.

But it works if I use data binding instead

<mx:Label text="{BoundValue} + {AnotherBoundValue}"/>

Are there any other possibilities for string concatenation?

I even would like to know if there is any possibility to use string
concatenation using the @Resource directive. Because here even data
binding doesn't work and I don't want to use ResourceManager etc. just
to add a simple colon to the resource string for instance. 

So maybe there is something that works.
Thank for your help.

Markus

 

Reply via email to