Subject Re: ENTRYFIELD
From Ronnie MacGregor <No_Sp@m.Thanks>
Date Mon, 16 Sep 2019 09:39:35 +0100
Newsgroups dbase.getting-started

In article <8zaTpRGbVHA.2332@ip-AC1E04A7>, invalid@invalid.invald says...


> > I have an ENTRYFIELD object whose onGotFocus event fires only when it gets
> > focus by either mouse click or tab key. It does not fire if you use
> > setfocus() method.

> Yes.  I think this has been reported as a bug.
>
> You can work around this in your program by executing the onGotFocus
> event handler yourself.
>
>      form.entryfield1.setfocus()
>      form.entryfield1.onGotFocus()

This general subject has surfaced many times over the years, and has previously
been discussed at great length.

My best memory of the conclusions is to the effect that this is not a bug.

The idea is that user interaction shouild fire all these events.

However, in this example, if the developer wants to move the focus to an
object, he/she/they may or may not want events to fire. It is therefore the
choice of the developer to fire any event that he wishes, as in Mervyn's
example two lines of code above.




--
Ronnie MacGregor
Scotland

Ronnie at
dBASEdeveloper
dot co dot uk

www.dBASEdeveloper.co.uk