Close field anomaly

Peter T. Evensen pevensen at siboneylg.com
Tue May 1 16:20:32 EDT 2007


It works for me:

If you have

on closeField
  if the text of me is not a number then
    select the text of me
    beep
  end if
end closeField

in the handler for the field, you get a beep and the text is selected.  
If you try to select the second field, it will still beep.

Since the "select the text of me" forces the closeField to be called the 
next time you try to move to another field, the field is validated 
again.  If it weren't, you could click the second field twice and move 
on (the first click would call closeField, which would beep and select 
the text; then if you didn't change [i.e., correct] the field, in theory 
closeField wouldn't be called, so the incorrect value would be accepted).

Chipp Walters wrote:
> Create a new stack with two fields. Set the script of the first fld to:
>
> on closeField
>  beep
>  select the text of me
> end closeField
>
> Now, enter text into fld 1 and try and click to fld 2. Can't. Any idea 
> why?
>
> -Chipp
> _______________________________________________
> 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