How to determine the focused object

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
leolaw
Posts: 2
Joined: Mon Nov 26, 2007 9:00 am

How to determine the focused object

Post by leolaw » Tue Nov 27, 2007 9:15 pm

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.

Post Reply