Functions out of the message path?

Jim Ault JimAultWins at yahoo.com
Mon Mar 6 21:39:28 EST 2006


On 3/6/06 3:16 PM, "Arthur Urban" <aturban at qwest.net> wrote:

> Is there a way to call a function in an object out of the message path?
> I'm surprised that there is no syntax for something like the following:
> 
> call DoSpecialCalculation( valueA, valueB ) of fld "Test"
> 
> and have the return value placed in the variable "it". Or even:
> 
> call into myLocalVar DoSpecialCalculation( valueA, valueB ) of fld "Test"
> 
> or better yet:
> 
> put DoSpecialCalculation( valueA, valueB ) of fld "Test" into myLocalVar
> 

This actually looks like two separate questions..
Answer One:
There is both a 'send' and a 'call' command in Rev.  Note the subtleties of
the 'call' command, but they are not really what you are looking for in the
cases you stated above.

Answer Two:
Here is one way to use the message path to your advantage
------
put 22 into valueA
put 33 into valueB 

insert the script of fld "Test" into back
put calcThisF( valueA , valueB ) into myLocalVar
remove the script of fld "Test" from back --or leave it there
answer myLocalVar
-----


Hope this helps.

Jim Ault
Las Vegas





More information about the use-livecode mailing list