Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Fox > Re: gotfocus Fi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 7 Topic 844 of 861
Post > Topic >>

Re: gotfocus Firing Twice

by "Stefan Wuebbe" <stefan.wuebbe@[EMAIL PROTECTED] > Jun 2, 2008 at 10:33 AM

> The problem that I have is that when these functions return, the focus
> goes back to the first form.  gotfocus fires a second time.  I do not
> want it to, or I want to avoid the save.

In addition, anyButton.GotFocus() also runs when the user tabs
thru the controls, doesn't it. I'd suggest not to use .GotFocus()
at all in your scenario but rather put both parts into button.Click()
(or .Valid()):
        If Thisform.SaveData()
            Thisform.ExternalXY()
        ...


Regards
-Stefan

"Gene Wirchenko" <genew@[EMAIL PROTECTED]
> schrieb im Newsbeitrag 
news:s23744t7f1b2ldtvp92ojg9j5moijm67u0@[EMAIL PROTECTED]
>     I have one form in my app which is used to control invoicing.  It
> has a number of functions that are internal and some that are
> external.  These functions are started by the operator clicking a
> button.  The form also has some data about the current client.  Some
> of this data can be changed.  It should be saved before doing
> something.  With most buttons -- the exceptions are unim****tant -- the
> gotfocus of the button contains code to save the client data.  The
> valid contains the code to run.
>
>     In the case of the external functions, other forms are created.
> The problem that I have is that when these functions return, the focus
> goes back to the first form.  gotfocus fires a second time.  I do not
> want it to, or I want to avoid the save.
>
>     I think I have a solution.  I can set a status flag in the
> valid's code which the save routine will check to determine whether it
> should save.  At the end, the save routine would reset this flag. This
> seems somewhat convoluted.
>
>     Is there something I am missing, or is this the way to go?
>
> Sincerely,
>
> Gene Wirchenko
>
> Computerese Irregular Verb Conjugation:
>     I have preferences.
>     You have biases.
>     He/She has prejudices.
>
 




 7 Posts in Topic:
gotfocus Firing Twice
Gene Wirchenko <genew@  2008-06-01 23:09:11 
Re: gotfocus Firing Twice
"Stefan Wuebbe"  2008-06-02 10:33:01 
Re: gotfocus Firing Twice
Gene Wirchenko <genew@  2008-06-02 17:19:41 
Re: gotfocus Firing Twice
"Stefan Wuebbe"  2008-06-03 08:56:40 
Re: gotfocus Firing Twice
"Olaf Doschke"   2008-06-02 11:37:21 
Re: gotfocus Firing Twice
"Stefan Wuebbe"  2008-06-02 12:29:05 
Re: gotfocus Firing Twice
"Olaf Doschke"   2008-06-02 13:19:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 10:33:56 CST 2008.