focusOut problem

Richard Gaskin ambassador at fourthworld.com
Mon Sep 22 21:03:01 EDT 2003


Doug Johnston wrote:

> I'm a long time Visual FoxPro developer who has stumbled over Revolution.
> Just trying it at the moment to see if it will serve may application needs
> (mostly business database).
> 
> I have run into a problem...
> I have 2 fields (Field 1 and Field 2) on a card along with a button (Close).
> I have a focusOut method in Field 1 that for now just contains a beep, but for
> the life of me I cannot get the focusOut to run.
> 
> I have placed a closeField method in the field's script and it works fine.
> 
> Anyone have any ideas.

Interesting how too much familiarity with a language makes a fella forget
the occassional "lack of orthogonality".   I'd certainly not thought about
this one in a while, but I agree the magic token is unobvious.  ;)

You're right, focusOut is the right message for _most_ objects, but unlocked
fields are an exception.  For those, if the data has changed you get the
closeField message as you've found.  If the data has not changed you get the
exitField mesages

Given that exitField is such an anomaly in an otherwise fairly
self-consistent language, maybe the only way you might hae discovered it is
in the See Also section of the Transcript Dictionary, as useful source to
keep in mind while you're learning.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge: Publish any database on any Web site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list