Re: Help! AS/AE is mangling my record item names!
Re: Help! AS/AE is mangling my record item names!
- Subject: Re: Help! AS/AE is mangling my record item names!
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 02 Jan 2002 17:04:58 -0800
On 1/2/02 4:41 PM, "Jim Roepcke" <email@hidden> wrote:
>
Hello,
>
>
I'm having problems with AS messing with the parameters I use in XML-RPC
>
calls. I've already filed this as a bug on bugreporter.apple.com, FYI.
>
>
set theParameters to {path:"/index"} as record
>
tell application "http://xmlrpc.usefulinc.com/demo/server.php"
>
set returnValue to call xmlrpc {method
>
name:"validator1.echoStructTest", parameters:{theParameters}}
>
get returnValue
>
end tell
>
>
the returnValue will appear in "the result" window as:
>
>
{ftpc:"/index"}
>
>
Does anyone know a workaround? How do I get AS to leave path: as path:?
>
'path' is an AppleScript keyword. Evidently something "interesting" happens
to it here . To use a keyword as a regular variable without conflict, you
can put it inside "pipes" : |path| (made by shift-\). Will that do?
set theParameters to {|path|:"/index"} as record
tell application "
http://xmlrpc.usefulinc.com/demo/server.php"
set returnValue to call xmlrpc {method name:"validator1.echoStructTest",
parameters:{theParameters}}
get returnValue
end tell
--> {|path|:"/index"}
get |path| of returnValue
--> "/index"
Or can't you give the label another name, such as thePath?
--
Paul Berkowitz