dbTalk Databases Forums  

gotfocus Firing Twice

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss gotfocus Firing Twice in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #51  
Old   
Stefan Wuebbe
 
Posts: n/a

Default Re: gotfocus Firing Twice - 06-03-2008 , 01:56 AM






You're welcome!

-Stefan


"Gene Wirchenko" <genew (AT) ocis (DOT) net> schrieb im Newsbeitrag
newsg39449n2rqf2sfjj62hroocljbmjvigpo (AT) 4ax (DOT) com...
Quote:
"Stefan Wuebbe" <stefan.wuebbe (AT) gmx (DOT) de> wrote:

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()
...

Arrgh! That makes perfect sense. I feel slightly ashamed that I
did not think of it. It will be a bit awkward to implement
considering the way that I currently have my classes set up, but it
appears to be the way to go. Thank you.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.




Reply With Quote
  #52  
Old   
Stefan Wuebbe
 
Posts: n/a

Default Re: gotfocus Firing Twice - 06-03-2008 , 01:56 AM






You're welcome!

-Stefan


"Gene Wirchenko" <genew (AT) ocis (DOT) net> schrieb im Newsbeitrag
newsg39449n2rqf2sfjj62hroocljbmjvigpo (AT) 4ax (DOT) com...
Quote:
"Stefan Wuebbe" <stefan.wuebbe (AT) gmx (DOT) de> wrote:

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()
...

Arrgh! That makes perfect sense. I feel slightly ashamed that I
did not think of it. It will be a bit awkward to implement
considering the way that I currently have my classes set up, but it
appears to be the way to go. Thank you.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.




Reply With Quote
  #53  
Old   
Stefan Wuebbe
 
Posts: n/a

Default Re: gotfocus Firing Twice - 06-03-2008 , 01:56 AM



You're welcome!

-Stefan


"Gene Wirchenko" <genew (AT) ocis (DOT) net> schrieb im Newsbeitrag
newsg39449n2rqf2sfjj62hroocljbmjvigpo (AT) 4ax (DOT) com...
Quote:
"Stefan Wuebbe" <stefan.wuebbe (AT) gmx (DOT) de> wrote:

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()
...

Arrgh! That makes perfect sense. I feel slightly ashamed that I
did not think of it. It will be a bit awkward to implement
considering the way that I currently have my classes set up, but it
appears to be the way to go. Thank you.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.




Reply With Quote
  #54  
Old   
Stefan Wuebbe
 
Posts: n/a

Default Re: gotfocus Firing Twice - 06-03-2008 , 01:56 AM



You're welcome!

-Stefan


"Gene Wirchenko" <genew (AT) ocis (DOT) net> schrieb im Newsbeitrag
newsg39449n2rqf2sfjj62hroocljbmjvigpo (AT) 4ax (DOT) com...
Quote:
"Stefan Wuebbe" <stefan.wuebbe (AT) gmx (DOT) de> wrote:

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()
...

Arrgh! That makes perfect sense. I feel slightly ashamed that I
did not think of it. It will be a bit awkward to implement
considering the way that I currently have my classes set up, but it
appears to be the way to go. Thank you.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.




Reply With Quote
  #55  
Old   
Stefan Wuebbe
 
Posts: n/a

Default Re: gotfocus Firing Twice - 06-03-2008 , 01:56 AM



You're welcome!

-Stefan


"Gene Wirchenko" <genew (AT) ocis (DOT) net> schrieb im Newsbeitrag
newsg39449n2rqf2sfjj62hroocljbmjvigpo (AT) 4ax (DOT) com...
Quote:
"Stefan Wuebbe" <stefan.wuebbe (AT) gmx (DOT) de> wrote:

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()
...

Arrgh! That makes perfect sense. I feel slightly ashamed that I
did not think of it. It will be a bit awkward to implement
considering the way that I currently have my classes set up, but it
appears to be the way to go. Thank you.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.