lock up a stack

J. Landman Gay jacque at hyperactivesw.com
Mon Sep 6 11:43:14 EDT 2004

On 9/5/04 11:55 PM, Sannyasin Sivakatirswami wrote:

> What is wanted is a kind of global lock text function that does 
> not require scripts to run through all fields in the mains stack and 
> substacks. but simply lock all the text in one go...

I haven't tried it, but you might want to experiment with something like 

Declare a global variable that will serve as a flag. If it is empty or 
false, no editing is allowed. If it is true, editing is allowed. Then in 
the stack script:

on openField
  global gEditFlag
  if gEditFlag then pass openField
  else select empty
end openField

Theoretically this would cause any click in a field to abort, but as I 
say, I haven't actually tested it. The cursor will turn into an I-beam 
when it is over a field, no matter what the flag is, so you might want 
to add a warning message saying that they can't edit the stack right now.

Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

More information about the use-livecode mailing list