Another Script Editing Tip

erik hansen erikhans08 at yahoo.com
Tue Jul 1 17:12:01 EDT 2003


--- Howard Bornstein <bornstein at designeq.com>
wrote:
> to lock and unlock a text field.
> I had this script in my home stack:
> 
> on mousewithin
>   global currentTarget
>   put the target into currenttarget
>   if currenttarget contains "field"  then
>     if the commandkey is down and the shiftkey
> is down then
>       set locktext of currenttarget to not
> locktext of currenttarget
>       wait 20 -- just so you don't toggle it on
> and off if someone
>       -- leaves the option key down
>     end if
>   end if
> end mousewithin
> 
> This script doesn't work in Revolution (unless
> it's in the actual field 
> you're trying to affect. It won't work in the
> stack script.) 
> 
> Apparently the mousewithin message doesn't
> travel up the hierarchy like 
> it does in HC. Can you tell me why?

there is a similar handler in the Winkler/
De Voto book using mouseUp. this works for
me in 1.1

=====
erik at erikhansen.org    http://www.erikhansen.org

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the use-livecode mailing list