Explicitly calling a Function is a Stack Script

Ken Ray kray at sonsothunder.com
Sun Apr 25 13:42:45 EDT 2004


> >The answer is "No"; but if myFunctionXYZ is in the script of stack

Actually, the answer is "Yes"; look at the value() function. Here's a simple
example:

STACK "TEST1"
=================
stack script:

function test
  return "Hello"
end test

STACK "TEST2"
=================
button script:

on mouseUp
  put value("test()",stack "Test1")
end mouseUp


Click on the button and you get "Hello" in the message box. Keep in mind
that this can get complicated when you add parameters...

HTH,

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




More information about the use-livecode mailing list