Another Script Editing Tip
Howard Bornstein
bornstein at designeq.com
Tue Jul 1 17:03:00 EDT 2003
>When looking for ways to make script editing more convenient, I found the
>following to be a simple and easy method which (best of all) allows me to
>keep the browse tool active -- no need to switch to the pointer tool.
This reminds me of another trick I used to use all the time in HyperCard
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?
Regards,
Howard Bornstein
____________________
D E S I G N E Q
www.designeq.com
More information about the use-livecode
mailing list