Problems with the focusedObject

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Sep 19 09:39:58 EDT 2008


Bonjour Graham,

May be the selectedField could be your friend?

if the selectedField <> empty then put the long name of the  
selectedField into tSourceField

Le 19 sept. 08 à 15:34, Graham Samuel a écrit :

> 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

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list