functions in other stacks: how to call?

Dar Scott dsc at
Sun Dec 1 18:06:01 EST 2002

On Sunday, December 1, 2002, at 01:32 PM, Jeanne A. E. DeVoto wrote:

> At 8:20 AM -0800 12/1/02, Oliver Hardt wrote:
>> hello:  i have a project with several stacks.  if i am in stack A and
>> want to call a function that is in the stack script of stack B, how
>> do i do it?
>   put value("myFunction()", stack "My Stack) into myValue
> Generally, the value function is more appropriate if you have a 
> "one-shot"
> need to call a function that's in an object not in the message path;
> "insert script" and "start using" are more appropriate if you need to 
> call
> functions from time to time throughout your app.
I have used this.  This is better than my call-return trick.  I had 
tried the trick to see if it would avoid a limitation and forgot to go 

Both get the right "me".

However, both have the same limitation.  Without a lot of work, they 
both are limited to simple constant parameters.  As soon as I use a 
variable as a parameter to the function, I have problems.  This works:

   put value("myFunction(23)", stack "My Stack") into myValue

This does not:

   put complicatedString() into alpha
   put value("myFunction(alpha)", stack "My Stack") into myValue

Is there a way to pass general parameters?

Dar Scott

More information about the Use-livecode mailing list