why does this not work and how do you do it?

J. Landman Gay jacque at hyperactivesw.com
Wed Apr 9 14:41:54 EDT 2008


Peter Alcibiades wrote:
> One card, one button, one field (called Field)  Traversal is off on the 
> button, on for the field. There is only one script - for the button - which 
> goes:
> 
> on mouseUp
>   ask "think of a number"
>   if it is not a number then 
>   put empty into field "Field"
>   focus on field "Field"
>   else
>   put it into field "Field"
>   focus on field "Field"
>   end if
> end mouseUp
> 
> What I expect to happen is that in either case the user will be able to enter 
> from the keyboard.  But what actually happens is that the cursor flashes in 
> the field, but the keyboard is dead.  To activate the keyboard you have to 
> double click in the field (why double?).

Your script works okay here, though if I enter a number the insertion 
point appears before the number rather than after. I can still type though.

You could try "select text of fld x" instead, maybe that will help.

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



More information about the use-livecode mailing list