开发者

How Can I Make an MXML Variable Bindable in Flex 3

Is it possible to use the Bindable compiler setting when using mxml?

I've got a string that I want to make bindable开发者_如何学运维:

<mx:String id="myString">My Text</mx:String>

I could make it bindable in Actionscript, like this:

[Bindable]
var myString:String = "My Text";

But, I'd like to use MXML in my situation.

I tried:

<mx:Metadata>
[Bindable]
</mx:Metadata>
<mx:String id="myString">My Text</mx:String>

But it threw a lot of warnings-- other classes were already marked bindable in my App.


Did you try to bind to your mxml variable without any changes? As far as I know all MXML tags are bindable by default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜