Scratching my head over handling the focus

Steve Checkley steve.checkley at taxcalc.com
Mon Apr 21 08:56:16 EDT 2008


Hi all,

I'm working on a library that has an inspector palette. The main
controls in this palette are a native list field and a custom control,
which is a group that is composed of various buttons, graphics and a
field (it looks rather like an OS X list/table view).

In keeping with the OSX style, I want the custom control to draw a focus
around itself and I've got a lovely script going that:

1.  Registers a custom control as having the focus when clicked on.
2.  Draws a focus and uses 'select empty' to turn off native control
that had focus before.
3.  When the next control is clicked on, if the previous control was my
custom control, it is told to remove its focus.

This works fine if I click on a line that contains text in the native
list field and then onto my custom control (list field loses its focus).
However, if I click on an empty line in the native list field and then
onto my control, the focus remains on the list field i.e. 'select empty'
does not appear to do anything.

Is there another away of turning off the focus of a control on Mac OS X?
I've really been scratching my head over this one!

Thanks,


Steve



More information about the use-livecode mailing list