[xmlrpcflash-development] [ xmlrpcflash-Bugs-1632353 ] typoe of values not encoded if within a stru
Brought to you by:
dopelogik
From: SourceForge.net <no...@so...> - 2007-01-10 13:17:33
|
Bugs item #1632353, was opened at 2007-01-10 05:17 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=382298&aid=1632353&group_id=24819 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: actionscript related Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: typoe of values not encoded if within a struct - fixed Initial Comment: Hi, THe MethodCallImpl class doesn't encode the type of values if they are within a STRUCT. This was a problem for me, so I've fixed it in my own version (although it could probably check for doubles etc, i only needed ints. Existing code: <snip> // add value node MemberNode.appendChild(this.createElement("value")); MemberNode.lastChild.appendChild(this.createTextNode(parameter.value[i])); </snip> my new code: <snip> // add value node MemberNode.appendChild(this.createElement("value")); // ammended by atom to wrap a type around the node values var aval = parameter.value[i]; if (typeof(aval) == "number"){ var subTypeNode:XMLNode = this.createElement("int"); } else if (typeof(aval) == "boolean"){ var subTypeNode:XMLNode = this.createElement("bool"); } else { // must be a string then. var subTypeNode:XMLNode = this.createElement("string"); } subTypeNode.appendChild( this.createTextNode( aval ) ); MemberNode.lastChild.appendChild( subTypeNode ); // end ammended by atom </snip> Adam (adam <at> adamhoyle <dot> co <dot> uk) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=382298&aid=1632353&group_id=24819 |