Who has experience extending Proxy?
I have successfully created dynamic bindable objects by both extending
Proxy and implementing EventDispatcher - this solution is available
around town, and I'm sure you've seen it.
However, if I use this dynamic object as a row in a dataProvider in a
Datagrid say, then the grid will call the object's toString() property.
My question is, how do I successfully implement Proxy's
"callProperty()" method?
My solution below was simply to return an toString() iteration of all
the properties, but I don't think this is the best way to do it.
override flash_proxy function callProperty(name:*, ... rest):*
{
if (name.localName == "toString")
{
var str:String = "";
for each (var field:String in this)
{
if (field != null)
str += field.toString();
}
return str;
}
}
Anyone know the best practice in this case?
thanks,
justin