Closing a field by clicking a button -OS X

simplsol at aol.com simplsol at aol.com
Wed May 30 02:18:25 EDT 2007


Jacque,
You are certainly keeping "programmer hours" - it's late even out here 
in LA.
I had tried the focus trick and, like you, discovered a lot of things 
"focused on" return the not valid control error (I got it with 
graphics, backgrounds, etc.)
The problem with confining the script to buttons clicked is that it 
makes no provision for menus clicked. Or does it? Menus are buttons in 
Rev. I'll check.
And, again, thank you.
Paul Looney


-----Original Message-----
From: J. Landman Gay <jacque at hyperactivesw.com>
To: How to use Revolution <use-revolution at lists.runrev.com>
Sent: Tue, 29 May 2007 9:49 pm
Subject: Re: Closing a field by clicking a button -OS X

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 
________________________________________________________________________
AOL now offers free email to everyone.  Find out more about what's free 
from AOL at AOL.com.
=0



More information about the use-livecode mailing list