calling a remote function..

FlexibleLearning at aol.com FlexibleLearning at aol.com
Fri Jan 19 13:51:28 EST 2007


 
Ken Ray wrote:
> On Fri, 19 Jan 2007 09:50:31 -0600, Chipp Walters  wrote:
>> Ding ding. You win the prize.
>>
>> answer  value("foo(" & q(param1) & comma & q(param2) & ")", btn  "bar")
> 
> Boy, I long for the simplicity that SuperCard uses to do  this kind of 
> thing. They have a "via" keyword that lets you point to  the object who 
> should be processing the function. In SuperCard, this  would be:
> 
>   answer foo(param1,param2) via btn  "bar"

J. Landman Gay wrote:
>The cheap hack is:
>
>   insert script of  <object> into back
>   answer  foo(param1,param2)
>   remove script of <object> from  back

>I've had to do this a couple of times and it works fine. Easy  too.
 
Hmmm... I see an opportunity to be contentious here. I  used to really miss 
"via" as well, but with the message passing hierarchy and  the rule of "write 
once use many", placing functions and handlers higher up the  chain is far more 
logical. This is essentially what "insert" is doing, so why  not just move 
the function and be done? Not a bug or missing feature but a  nudge to 
implementing good writing style.
 
2c
 
/H




More information about the use-livecode mailing list