Recipes for Defining Bindable Properties in Flex 2.0
Wednesday, January 23rd, 2008You’re a Flex 2.0 programmer and wish to define an instance property of some class. You wish this property to be bindable, because it’s displayed. You also wish it to be read-only, for encapsulation. The property is variable, but the application code is not permitted to modify it directly. (Presumably, there are functions of the class that modify the value internally.) This is a recurring question, and the answer is not straightforward. I have been asked about this more than once by colleagues here at Allurent. A cookbook solution is called for. Here it is. (more…)