Page 2 of 2

Re: Struggling Handling Focus of 1 field

Posted: Sat May 16, 2015 11:25 pm
by MouseUp
If you want to keep the graphic, then you need to Disable the graphic... Select the Pointer Tool, then double click on the graphic, then check the "Disabled" box in its Basic Properties palette.

Re: Struggling Handling Focus of 1 field

Posted: Wed Sep 30, 2015 7:32 pm
by mrcoollion
Do not know if this is handy for some but I needed to save the field data as soon as the field was left by the user.
When a user left the field by clicking on another button the routine was not triggered so I combined the following and that works great for me.

In the main stack I placed a command called UpdateVarField with variable theFieldName. This command does everything I would like to do after a user leaves that field, of course you can do that different or even place a routine (command or function) local. The idea is to use 'on exitField' and 'on closeField' both, that makes it work.
Maybe someone can use this...

Code: Select all

on exitField
   put the name of me into tVar
   replace quote with "@" in tVar
   set itemdelimiter to "@"
   put item 2 of tVar into theFieldName
   UpdateVarField theFieldName
end ExitField

on closeField
   put the name of me into tVar
   replace quote with "@" in tVar
   set itemdelimiter to "@"
   put item 2 of tVar into theFieldName
   UpdateVarField theFieldName
end closeField