Developer Annoyance #1

Mark Smith mark at maseurope.net
Fri Mar 17 06:22:45 EST 2006


I may be misunderstanding the problem, but is it really a message  
passing problem?

This, in a buttons script will fail:

on mouseUp
   put "1+2" into n1
   put "2+2" into n2
   calc n1,n2
   put the result
end mouseUp

on calc n1,n2
   return n1 + n2
end calc

So if you pass quoted expressions to a handler as parameters, they  
don't get evaluated in the handler unless you evaluate them yourself:

on calc n1,n2
   return value(n1) + value(n2)
end calc

Mark


On 17 Mar 2006, at 09:58, Dick Kriesel wrote:

> On 3/17/06 12:47 AM, "Arthur Urban" <aturban at qwest.net> wrote:
>
>> I'm sure it evaluates literals just fine, but it does not
>> evaluate containers.
>
> This works here:
>
> on mouseUp
>   put 1 into t
>   send "foo t,t+1"
> end mouseUp
>
> on foo
>   ask the params
> end foo
>
>
> Do you have a counter-example?
>
> -- Dick
>
>
> _______________________________________________
> 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