Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LostFocus and Valid
Message
From
23/05/2001 05:58:06
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00510008
Message ID:
00510236
Views:
20
Hi!

If parent class have no code in the LostFocus event, dodefult() will fire this event twise. This is a known problem in VFP that you can work around only by using explicit call of the default functionality. So, your code should look like following:

IF This.IsValid
NODEFAULT
DODEFAULT()
ELSE
...

If parent class have a code in this event, than I have no other idea about the reason of the problem. Need more information to investigate problem.


>Hi All,
>
>I have a container that contains a mover control inside. The container has a custom valid method that is called in the LostFocus event. All works well unless the control is the last control on the form before the save button then is fails. While in the move control click on the SAVE button, the LostFocus fires, isValid returns .T., but the save is not executed.
>
>Is the work around for this problem?
>
>LOSTFOCUS
>
> IF This.IsValid
> DODEFAULT()
> ELSE
> NODEFAULT
> This.SetFocus()
> ENDIF
>
>TIA,
>
>Bob
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform