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

Sarah Reichelt sarah.reichelt at gmail.com
Mon Nov 2 05:14:22 EST 2009


Hope your tooth is better now.

I think you need to use both solutions.
Jan suggests setting the button's traversalOn to false so that it
doesn't become the focusedObject when clicked.
Klaus points out that you need to use the short name of the
selectedField for your current script to work.

If you put both these solutions together, then I think it should work,
but if not, please post more details and we can trya gain.

Cheers,
Sarah


On Fri, Oct 30, 2009 at 11:37 PM, William de Smet
<williamdesmet at gmail.com> wrote:
> Hi Jan & Klaus,
>
> None of your answers works for me :-)
> Must be something else then that is bugging me.
> Could be the dentist! Got to go there within the hour because of an
> awful toothache.
>
> to be continued....
>
> Greetings,
>
> William
>
> 2009/10/30 Klaus Major <klaus at major.on-rev.com>:
>> 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
>>
>> _______________________________________________
>> 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
>>
> _______________________________________________
> 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