Problems with the focusedObject
Graham Samuel
livfoss at mac.com
Fri Sep 19 09:34:35 EDT 2008
I'm trying to implement a simple Undo for a text entry screen
consisting of a grid of fields acting as cells (not a single table,
but individual fields). To do this, when the user selects say "Cut"
from the available menu, I want to record not only the currently
selected text - no problem - but also the ID (or better, the name) of
the field/cell where the text was before it was cut. However when I
execute a script line like
put the short name of the focusedObject into lastFieldCut
the name is that of the underlying card. This doesn't seem to be what
the documentation says is supposed to happen. The documentation
suggests that the underlying card is returned when nobody has the
focus, yet I have seen the cursor blinking just as I pull down the menu.
I think that by invoking a menu I somehow have altered the focus,
albeit temporarily.
Can anyone explain how I can find out which field was in play when the
menu was invoked?
TIA
Graham
More information about the use-livecode
mailing list