Puzzling about 'the focusedObject'

J. Landman Gay jacque at hyperactivesw.com
Tue Dec 10 20:12:50 EST 2013


On 12/10/13 4:16 PM, Graham Samuel wrote:

> if the focusedObject contains "field" then select the text of the
> focusedObject [...]
>
> This seems a nice, robust idea. But if I open a palette and see a
> flashing cursor in a field, that bit of code doesn't work because
> 'the focusedObject' refers to the last field to have the focus in the
> card in the mainstack.

I always use "the selectedfield". My "select all" menu item has a very 
short bit of script:

if the selectedfield <> empty then select the text of the selectedfield

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the Use-livecode mailing list