How do I check which field has the focus on / is active?

Klaus Major klaus at major.on-rev.com
Fri Oct 30 09:32:13 EDT 2009


Hi William,

> Hi there all,
>
> How do I check which has the focus on / is the active one?
> When I use: 'answer the selectedField' it shows me the correct field
> but when I put the next code into a button it doesn't work anymore:
> --
> on mouseUp
> put the name of the selectedField into tData
>
> if tData = "number1"
> then send mouseup to btn "check"
> ...
> end mouseUp

...
put the name of the selectedField into tData
...

If you look at the content of the variable "tDate" you will see  
something like this:
FIELD "Name of field here..."
!!!

So if you change the line to:
...
put the SHORT name of the selectedField into tData
...
your script will run as exspected :-)

> --
> Thanks!
> Greetings, William

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com




More information about the use-livecode mailing list