Closing a field by clicking a button -OS X

Jim Ault JimAultWins at yahoo.com
Tue May 29 18:24:29 EDT 2007


are you sure the 'closefield' is never sent?
turn on the message watcher  and see if it gets sent to the card before is
closes.  I am not very familiar with user interface control, but focus and
message passing is probably the real answer here.

eg. on closecard, if the focused object is a field, then deal with it before
leaving, etc.

Jim Ault
Las Vegas


On 5/29/07 3:14 PM, "simplsol at aol.com" <simplsol at aol.com> wrote:

> I need to set a flag in on a card when the contents of any of the
> fields on that card change.
> 
> This almost works:
> 
> on closeField
>     setTheFlag
> end closeField
> 
> 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.
> 
> Is there a good way to send a message (like closeField) when the user
> edits a field then clicks elsewhere?
> 
> We tried:
> 
> on mouseDown
>    if the tool is "browse tool"  and (word 1 of the name of the target
> is not "field") then select empty
>   pass mouseDown
> end mouseDown
> 
> but it broke under version 2.8.1 - no more copy and paste!
> 
> Perhaps there is a way to remove focus from all controls on a card???
> 
> I appreciate your help, thanks in advance.
> Paul Looney
> ________________________________________________________________________
> AOL now offers free email to everyone.  Find out more about what's free
> from AOL at AOL.com.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list