Equivalence to the SuperCard function call "via" object

Jo=?ISO-8859-1?B?6w==?=l Guillod joel.guillod at net2000.ch
Mon Jul 7 12:07:00 EDT 2003


I am trying to do what Supercard do with the function...via. That is I want
that the function is evaluated by the script of the specified object.

E.g.:

In Supercard you can write :

 put getSomeData(1,the date,tMyVar,tAnOtherVar) via btn "MyButton" of \
   cd 10 of stack "someStack" into tMyResult

How to translate that into rev?

 -- does not work:
 send "get getSomeData(1,the date,tMyVar,tAnOtherVar)" to \
   btn "MyButton" of cd 10 of stack "someStack" into tMyResult
 put it into tMyResult

 -- does not work or dont give the expected result:
 get value("getSomeData(1,the date,tMyVar,tAnOtherVar)", \
   btn "MyButton" of cd 10 of stack "someStack")
 put it into tMyResult

 -- work around but not elegant:
 -- getSomeData is no more a function but a handler...
 call "getSomeData "1,the date,tMyVar,tAnOtherVar" of \
   btn "MyButton" of cd 10 of stack "someStack"
 put the result into tMyResult

Of course, putting the script of the target object in the message path is
some other possibility but I would exclude this for implementation reason.

Maybe the "function via object" a feature for the wish list?

Or did I miss something?

Joel

> Message: 9
> Date: Sat, 5 Jul 2003 06:40:44 -0700
> To: use-revolution at lists.runrev.com
> From: "Jeanne A. E. DeVoto" <jeanne at runrev.com>
> Subject: Re: Equivalence to the SuperCard function call "via" object
> Reply-To: use-revolution at lists.runrev.com
> 
> At 1:30 AM -0700 7/5/03, Joël Guillod wrote:
>>>> Is there an equivalent to the following Supercard statement?
>>>> 
>>>> functionName([paramList]) via object
>> 
>> YES I did but it does not behave as described in the docs, only the "me"
>> keyword is related to the optional object param.
> 
> 
> What exactly are you trying to do?
> 
> --
> Jeanne A. E. DeVoto ~ jeanne at runrev.com
> Runtime Revolution Limited - Software at the Speed of Thought
> http://www.runrev.com/




More information about the use-livecode mailing list