Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid valid does not fire
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01396480
Message ID:
01398355
Vues:
83
Naomi
In the Valid or LostFocus the first statement is to verify that a close or cancel button has not been clicked.
LOCAL oLoc,lsValue,llAct,llOK,lsMsg
STORE "" TO lsValue,lsMsg
STORE .T. TO llAct,llOK
* get the location of the Cancel & Close button (cmdDelete & cmdClose) 
* get reference to object under mouse pointer
oLoc = sys(1270)
if vartype(oLoc)="L"
	oLoc = This
endif
IF !INLIST(lower(oLoc.name),"cmdUpdate","cmddelete","cmdedit","cmdadd","cmdclose")
I believe it "finally" dawned on me that there was an issue with that code. if the mouse pointer is left on the add or edit button after either are clicked, the Valid or LostFocus code does not run, "by design"...crap! I have had issues like this (valid code not running), intermittently for a while. Who knows why the light-bulb just turned on! It helps to have the coverage profiler turned on.

When I removed the above reference to "cmdedit, cmdadd" the code works.

Is there a better way to keep the valid from running when closing the form or canceling a process?

>>Dragan
>>Sorry for not responding sooner, other projects to do, but this one is still a problem.
>>Yes Confirm is ON and the cursor does appear to leave the cell/textbox. The LostFocus code does fire if I click on the textbox first, then press tab or enter.
>
>Chuck,
>
>Could you please outline your problem for me? I had some weird problems with Grid.Valid and textbox.valid long time ago, may be somehow these could be related.
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform