Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GotFocus BUG: infinite loop
Message
From
15/04/2003 09:20:31
 
 
To
15/04/2003 09:16:11
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00777668
Message ID:
00777675
Views:
9
>Hi all,
>
>Problem: NODEFAULT on FirstFormTabControl.Gotfocus generate infinite loop.
>
>Execute this code:
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>RETURN
>
>DEFINE CLASS form1 AS form
>
>Caption = "gotfocus bug"
>Name = "Form1"
>
>ADD OBJECT text1 AS textbox WITH Left = 60, Top = 35, Name = "Text1",TabIndex=6
>
>ADD OBJECT text2 AS textbox WITH Left = 63, Top = 76, Name = "Text2",TabIndex=5
>
>PROCEDURE text1.GotFocus
> WAIT WINDOWS "gotfocus on :"+this.Name NOWAIT TIMEOUT 2
>ENDPROC
>
>PROCEDURE text2.GotFocus
> WAIT WINDOWS "gotfocus on :"+this.Name NOWAIT TIMEOUT 2
> NODEFAULT
>ENDPROC
>
>ENDDEFINE
>
>Infinite GotFocus Loop on Activate Form.
>Click on text1 : loop stop
>Click on text2 : loop restart
>Click on text1 : loop stop
>Press Key Tab : loop restart
>
>Fabio

Fabio,

Why not return FALSE from the text2.When() event if you do not want it the get the focus ?
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform