Open GoogleCodeExporter opened 9 years ago
Here's an example of how this could be handled better:
private function objectToURLVariables(params:*):URLVariables {
var vars:URLVariables = new URLVariables();
// this assignes non-dynamic properties
var type:XML = describeType(params);
for each (var prop:XML in type.variable) {
var propName:String = prop.@name;
if (null != params[propName]) vars[propName] = params[propName];
}
// this assigns dynamic properties
for (var property:String in params) {
if (null != params[property]) vars[property] = params[property];
}
return vars;
}
Original comment by bmj...@gmail.com
on 31 Oct 2011 at 4:07
Original issue reported on code.google.com by
bmj...@gmail.com
on 31 Oct 2011 at 3:23