Reset Locals?
Rob Cozens
rcozens at pon.net
Thu Jul 6 12:09:50 EDT 2006
Hi Scott,
>I'm still curious though... I seem to remember seeing this on the list many
>many moons ago: is there a way to access the local variables of a script
>from outside the script? Something like:
>
> get the myCoolVar of script of btn 2
>
>Was I dreaming or is this possible?
It's quite simple: just add a getLocal function and a setLocat
command to the script where the local is declared:
local myCoolVar
function getMy CoolVar
return myCoolVar
end getMyCoolVar
on setMyCoolVar newValue
put newValue into myCoolVar
end setMyCoolVar
From elsewhere in the stack: send "setMyCoolVar"&&newValue to controlWithScript
--
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