Please suggest an easy way to deactivate a fields scripts

Jim Bufalini jim at visitrieve.com
Tue Mar 17 17:34:16 EDT 2009


Hi William,

There are probably a half dozen ways or more do this from putting two
different sets of scripts in custom properties or another place and toggling
by using *set the script of ... to....* on pressing a keystroke combination,
to several other ways. 

But, if I were doing it, and so that it was easier to remember what you did
a year from now, is put in a global or script local var which gets toggled
to true or false on pressing a keystroke combination or a control and then
at the beginning of any handler you wish to disable, make the first line *IF
<var> then exit <handlername>* Then a year from now, when your debugging, it
will be obvious if the var is true or false and why handlers are exiting.
;-)

Aloha from Hawaii

Jim Bufalini

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com [mailto:use-revolution-
> bounces at lists.runrev.com] On Behalf Of william humphrey
> Sent: Tuesday, March 17, 2009 9:32 AM
> To: How to use Revolution
> Subject: Please suggest an easy way to deactivate a fields scripts
> 
> I have a data entry field with a bunch of scripts in it that do things
> like
> search through a set of data by watching each key stroke. This is fine
> must
> of the time but occasionally I just want to quickly put some data in it
> that
> is not evaluated. Presently I use "contents" of the inspector to do
> that but
> for the final program would like a button you press that says "edit
> field no
> checks" or something and that button turns off all the scripts in that
> field
> so you can quickly put in some data. The only way I can think to do it
> is to
> have another field that pops up and you put the data is and then it
> closes
> and enters the data in the field with all the scripts. I was just
> wondering
> if there was a quicker way to do that.
> _______________________________________________
> 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