disable command

J. Landman Gay jacque at hyperactivesw.com
Fri Nov 18 12:16:51 EST 2005


Nicolas Cueto wrote:
> An hour or two of debugging but...
> 
> My card has 16 images, each with
> a mouseUp script. I only want one
> script to run at a time. So, within
> the mouseUp script of each image
> I added calls to lock/unlock handlers
> contained in the card script, i.e.,

I don't think I would do it this way. Instead, I would put a single 
"mouseup" handler in the card script and test for "the target".  Name 
each image consistently, for example, "mazeImg1", "mazeImg2", etc. Then 
you can do something like this:

on mouseUp
  if the short name of the target contains "mazeImg"
  then send "doMazeStuff" to the target
  else pass mouseUp
end mouseUp

Each image would have a handler called "doMazeStuff" that controls its 
behavior -- just like what your mouseUp handlers are doing now.

If a user clicks on several images in order, their scripts will run 
sequentiallly, so that shouldn't be a problem, right?

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



More information about the use-livecode mailing list