Value of function from a group NOT in the message path
Raymond E. Griffith
rgriffit at ctc.net
Wed Jun 16 12:50:42 EDT 2004
----- Original Message -----
From: "Dar Scott" <dsc at swcp.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Wednesday, June 16, 2004 11:50 AM
Subject: Re: Value of function from a group NOT in the message path
>
> On Jun 15, 2004, at 11:20 PM, Troy Rollins wrote:
>
> > I understand the getProp approach... and admit to not having
> > considered it, but for the purpose of enlightenment, what is the send
> > syntax when a return value is desired?
>
> Untested:
>
> -- button a
> on mouseUp
> send "getDatum" to button b
> put the result
> end mouseUp
>
> -- button b
> on getDatum
> return 5
> end getDatum
>
> This does not work "in time". In that case the result is the message
> id.
Actually, using value-by-reference would probably be better:
on mouseUp
send "getDatum" && x to button b
put x
end mouseUp
-- button b
on getDatum @x
put 5 into x
end getDatum
The "@" means that the value of x in the sending script is changed by the
value of x in the handler sent to. This is a very handy construct.
Raymond E. Griffith
>
> Dar Scott
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list