Closing a field by clicking a button -OS X

J. Landman Gay jacque at hyperactivesw.com
Wed May 30 00:49:12 EDT 2007


J. Landman Gay wrote:
> simplsol at aol.com wrote:
>> Jacque,
>> Thanks for your (very prompt) response.
>> Unfortunately it does matter in this situation. setting the flag for 
>> unchanged fields will create unnecessary network traffic.
>> We need something that will not send the "closeField" unless the field 
>> has changed.
> 
> Hm. In a very limited test (like, one try) this seemed to work:
> 
> on closefield
>   put the ticks -- or "setTheFlag" in your script
> end closefield
> 
> on mousedown
>   focus on the target
> end mousedown
> 
> Not exactly stress-tested though. ;)
> 

So I did it a second time and found out you need something like this:

  on mousedown
    if the target contains "button" then focus on the target
  end mousedown

Because otherwise, clicking on the card gives an error about it not 
being a valid control.

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



More information about the use-livecode mailing list