text fields don't focusIn

Jim Ault JimAultWins at yahoo.com
Sat Jun 24 23:51:27 EDT 2006


On 6/24/06 7:29 PM, "Jared Smith" <smith.sgt at gmail.com> wrote:

> This issue seems so basic, yet I'm going crazy over it. I've put a
> focusIn handler inside a text field which tells it to do something.
> When I click the text field (thus focusing in on it), nothing happens.
> Am I doing something wrong?

Try opening 
Message Watcher in the Development menu
to see what it reports as you click, type, etc.

Also put the following in script containers to trap-show-and-pass

on focusIn
  put "FIELD script hit" & cr & msg
  pass focusIn
end focusIn
on focusIn
  put "     CARD  script hit" & cr & msg
  pass focusIn
end focusIn

on focusIn
  put "          STACK          script hit" & cr & msg
  pass focusIn
end focusIn

The point is that you need to see what is happening with the keyboard, the
field script container, the focus, and the exact order of the messages.
This is part of the rich fabric of UI (user interface) management, so you
need to build things carefully.

Be sure to PASS messages that need to travel all the way to the engine to
make things happen/change.

Hope this helps.

Jim Ault
Las Vegas






More information about the use-livecode mailing list