Handling Long ID in Params?

Ken Ray kray at sonsothunder.com
Mon Oct 17 08:18:06 EDT 2011


On Oct 17, 2011, at 4:11 AM, Scott Rossi wrote:
> 
> Maybe this isn't the best method to accomplish what I need, but can anyone
> see why this is failing?

Scott, when you execute the "do", it's getting the text of the button and passing that along instead of the long id that's coming into "routeTheCommand". To make it not evaluate it, call:

routeTheCommand "getTheSum","the long id of btn 1"  -- put quotes around the second param

The other way you could do it would be to insert "the long id of " before theArgs if you knew it was an object reference that was coming in:

command routeTheCommand
  put word 2 to -1 of the params into commandData
  put stripOuterQuotes(item 1 of commandData) into theCommand
  put stripOuterQuotes(item 2 to -1 of commandData) into theArgs
  put "the long id of " before theArgs
  do theCommand && theArgs
end routeTheCommand

Funky, but it works…

:D

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/	




More information about the use-livecode mailing list