flex notes 之:对getter函数的数据绑定

by

in

天天忙于实际项目的结果之一,就是来来回回反反复复测代码,就是不愿意停下来查原理。

这会儿实在不想test了,查了查把数据绑定到getter function上为何不更新。flex帮助文档结果如下:

Using read-only properties as the source for data binding

You can use a read-only property defined by a getter method, which means no setter method, as the source for a data-binding expression. Flex performs the data binding once when the application starts.

原来只在程序初始化时执行一次绑定,所以在必要时还得用事件推一推。