Closing a field by clicking a button -OS X
Michael Binder
runr at prismpole.com
Tue May 29 20:06:44 EDT 2007
Hi Paul,
you wrote:
> The problem occurs when the user clicks a button, or
> uses the menu to leave the card. On OS X the closeField
> command is not sent when leaving a field under these
> circumstances - the field never loses focus.
Your "problem" is an important feature! When you
click a button or a menu, you often need to know what
the selected text is so that you can do something with
it (e.g. make it bold or italic). There is a simple
solution: just put the following line in a mousedown,
mouseup, or menupick handler:
select empty
When you 'select empty' a closefield will be sent to
the field with the selected text if the contents of
the field have changed.
--Michael Binder
More information about the use-livecode
mailing list