Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Handling Priority
Message
De
25/09/2013 13:51:02
 
 
À
25/09/2013 13:00:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01584109
Message ID:
01584120
Vues:
55
>You may want to look at "Error Handler Priority" in VFP9 help
>
I had done that and found it very confusing.

I was hoping someone here could translate it for me in a way even I could understand. Sort of like the teacher who tries different techniques for his/her "slower" students until one sticks.




>
>>What is the sequence in which error handling is processed? In my particular instance, I'm trying to remove from a page in a pageframe all labels of a certain name. I'm doing this in the valid of a textbox on the main form. My code is
>>WITH thisform.pframe
>>     .
>>     some code
>>     .
>>	WITH .pgPassFail
>>		** Remove the "Board Number" objects from the pass/fail page
>>		iBoard = 0
>>		DO WHILE .T.
>>			iBoard = iBoard + 1
>>			TRY
>>				.RemoveObject(".lblBoard"+TRANSFORM(iBoard))
>>			CATCH
>>				EXIT
>>			ENDTRY
>>		ENDDO
>>	ENDWITH
>>     .
>>     more code
>>     .
>>ENDWITH
>>
>>I know there are other (probably better) ways of doing this. I'm not looking for help on that as I'm (pretty sure I can work that out on my own. But........
>>
>>when the object doesn't exist, I would have expected the TRY/CATCH block to kick in and execute the code in the CATCH section. Instead, the form ERROR method is invoked
>>
>>So. Assuming that all of the following exist
>>
>>1. ON ERROR
>>2. Form Error Method Code
>>3.. Control Error Method Code
>>4. TRY/CATCH code
>>
>>What is the sequence in which the error checking takes place?
>>
>>Thanks...........Rich
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform