Handling Long ID in Params?

Scott Rossi scott at tactilemedia.com
Mon Oct 17 19:09:14 CDT 2011


Wow, just got bitten by this long id reference again -- twice in 24 hours!

I've been trying to call a function of another object using the old routine:

  get value("specialFunction()",remoteObject)

And once again, this handler was failing for me when passing the long id of
a control within the function.  I kept getting "source is not a container"
errors (which doesn't help, because of course the long id of a control is
valid), so on a whim I tried placing "long id of " before the object
reference and it worked.

 put "long id of" && long id of btn 1 into theObj
 get value("specialFunction(" & theObj & ")", theSource)

Thanks yet again Ken, my forehead is a bit less bloody now, and the wall has
been spared a few more blows.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design




Recently, Ken Ray wrote:

> 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:





More information about the use-livecode mailing list