calling a remote function..

Andre Garzia soapdog at mac.com
Fri Jan 19 10:48:36 EST 2007


Chipp,

I use stuff like that all the time in the RevHTTP server for running  
the functions on cgis. But I don't usually use functions, I use  
handlers that like function return values. I assemble a line with a  
send call in a string and I execute that string using DO. then I  
check for the result variable for my return values. This works very  
fine.

I know you're trying to call functions and not handlers but I've  
entered the same trouble you're in now and solved it by using  
handlers and send. I know this is no solution and just a hack, but it  
is working and it is easy to understand.

cheers
andre

On Jan 19, 2007, at 10:55 AM, Chipp Walters wrote:

> Trying to call function 'foo(param1,param2)' in button "bar" from  
> somewhere
> outside the message path.
>
> So, I do this:
>
> put "1,000" into param1
> put "Soldiers" into param2
> get value("foo(param1,param2)",btn "bar")
>
> Sadly, the literals "param1" and "param2" are passed to foo instead  
> of the
> variables.
> I've tried escaping, quoting, and waving a half dead chicken over  
> foo. No
> good. Any ideas?
>
> TRY YOURSELF
> Create a new stack:
> create button "bar" with script:
>
> function foo param1,param2
>  answer param1 &cr& param2
> end foo
>
> Create another button "PressMe"
>
> on mouseUp
>  put "1,000" into param1
>  put "soldiers" into param2
>  answer value("foo(param1,param2)",btn "bar")
> end mouseUp
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list