answer the result

Rob Cozens rcozens at pon.net
Tue Apr 11 13:15:32 EDT 2006


Hi Dave,

> I was reviewing some old scripts, which basically look like this:
>
>   on mouseUp
>       get url "http://www.lacscentre.co.uk/nofile.txt"
>       if the result is not empty then
>         answer the result
>       else
>         put it into field 1
>      end if
>   end mouseUp
>

I'm surprised to find this ever worked.  I invariably have problems if 
I try to reference "the result" anytime except immediately following 
the statement whose result I'm checking.  It's awkward, but I find 
myself coding:

	get the result
	if it is not empty then
		beep
		answer it
	else

in order to both evaluate it and reference its contents.

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)




More information about the use-livecode mailing list