Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange sequence of Events firing
Message
 
To
03/08/2002 20:01:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00685837
Message ID:
00686293
Views:
32
Steve, the reason I need a Window (Messagebox actually is as follows)
(Maybe there is another way to do this !!

I have Code in the GotFocus to test on warnings

e.g.
Do a test for various warnings
If any warnings have happened
MessageBox('Following warnings have happened')
Endif

The result is as follows:

If there have been no warnings, code goes straight to the Click event
If no warnings, then it stops at the cmdButton and The Enter key has to be pressed again. (presumably because the MsgBox has eaten the click)

I also need this code to go into the Gotfocus, because I dont want the user having to specifically Click on the control to action it.... .e.g when they Land on this button in the normal Tab sequence, the gotFocus will trigger

regards,

Gerard











>Gerard,
>
>Remove the WAIT WINDOW from the gotfocus() method, and the problem will go away :)
>
>Seriously, why do you need WAIT WINDOW in that method?
>
>>Jim, I've been playing around with this Wait Window 'eating' the click and cant find a way of stopping it....do you know if it is possible to stop this beahviour (I presume the same happens with any user interaction ..like a messagebox)
>>
>>Regards,
>>
>>Gerard
>>
>>
>>
>>
>>>Your WAIT WINDOW is eating the click event on you.
>>>
>>>>I have a problem understanding why events fire in a particular sequence.
>>>>Example as follows:
>>>>
>>>>I set up a CommandButton and had following :
>>>>In GotFocus event: @ 1,1, say 'Test Got Focus'
>>>>In Click Event @ 2,1 say 'Tect Click event'
>>>>
>>>>If I click on the button once,,fires both the GotFocus and Click event codes
>>>>
>>>>
>>>>I set up another button:
>>>>In GotFocus: wait window 'test Got Focus' timeout 1
>>>>In Click Event @ 2,1 say 'Test Click event'
>>>>If I click on the button once, only the GotFocus event fires !!
>>>>
>>>>Can anybody explain this
>>>>Regards,
>>>>
>>>>Gerard
Previous
Reply
Map
View

Click here to load this message in the networking platform