Page 1 of 1

How to determine the focused object

Posted: Tue Nov 27, 2007 9:15 pm
by leolaw
How would you store the name of the user's last focused field?
I am building an on-screen keyboard where the user can select a field anywhere on a card (to make it focused) and enter the message. The On-Screen Keyboard is built on a separate card in the same stack. But I have some problems sending the message back to the "focused" field. Here is the script of my On-screen keyboard:

on mouseUp
put field "Sentence_1" & return into the last focusedObject
put empty into field "Sentence_1"
go to card MainProgram
end mouseUp


The field "Sentence_1" contains the message that I want to copy to the field that the user has focused. Any help or comment would help

Thanks.