functions in other stacks: how to call?

Dar Scott dsc at swcp.com
Sun Dec 1 20:20:01 EST 2002


On Sunday, December 1, 2002, at 04:23 PM, Jeanne A. E. DeVoto wrote:

>> Is there a way to pass general parameters?
>
> You just have to do a bit of fancy footwork with quotes and &:
>
>   put value("myFunction(" & alpha & ")",stack "My Stack") into myValue

Here's a way that might work with more types of values:

**********************************
local arg1

function getArg1
   return arg1
end getArg1


on mouseUp
   put tinyNumArrayOrStringWithLotsaQuotes() into arg1
   put value("HisFun(  value("&quote&"getArg1()"&quote&","& the long ID 
of me&")  )",stack "His Stack")
end mouseUp
***********************************

This passes numbers unstringafied.  However, arrays seem to get lost or 
I'm doing something wrong.

Dar Scott




More information about the Use-livecode mailing list