On Aug 29, 2014, at 11:43 AM, Peter Haworth wrote:

> One other question regarding send.  You can "dispatch function" - is there
> a way to send a message to a function and get hold of the result (obviously
> without a time specified)?

Look at the "call" command. This works for commands contained in the scripts of 
other objects, and I thought you could use if for functions too, but as I just 
experimented with it, I can't get that to work. However, you can do this:

put the following into the script of fld "text":

on testFn x
   return x^2 + 1
end testFn

Then in the script of some other object you can:

call "testFn 3" of fld "test"
put the result

And you will indeed get "10" in the message box.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to