Hi Ian,
   The backend shouldn't care about element order. :-)

Thanks for the support on that - I would agree, think the coder is being a bit lazy here.

//I was looking at doing something like:
if(params){
var keys:Array = new Array();
for each (var key:String in obj) {
   keys.push(key);
}
keys = keys.sort(null, |Array.CASEINSENSITIVE|);

cmd.command.appendChild(<parameters/>);

for(var i:int = 0;i < keys.length;i++) {
  var par:String = keys[i];
   var parXML:XML = <{par}>{params[par].toString()}</{par}>;
   cmd.command.parameters.appendChild(parXML);
}
}
/*which might be a bit slower, but I am already looping through the object anyway, so only hardcoding my end would speed it up and speed was not a requirement (yet)*/
But that sort of hard-coding feels totally wrong, and makes me think
that there is too much hardcoding going on at the C++ end.

Yep...  lazee coders :)

Ta
Glen
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to