I want to exclude the use of magic strings in the following cases:
BindingUtils.bindProperty(obj1, "propertyName", obj2, ["childObj", "anotherProperty"]);
or
var ddl:DropDownList = new DropDownList();
ddl.labelField = "propertyName";
it would just type something like:
ddl.labelField = GetPropertyName(ComplexType.propertyName);
This will simplify refactoring and eliminate runtime errors when changing a property name.
Any ideas?
source
share