Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with MAIN program code
Message
De
10/10/2001 13:39:10
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
10/10/2001 11:29:42
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00566287
Message ID:
00566523
Vues:
13
>I am having more difficulty with "stopping" the app. As I mentioned, I do have the SYSTEM form modal and returning a value. I do have the PRG trapping the return and attempting to"
>
>
>if vAbort=.T. then
>  clear event
>  quit
>endif
>
You didn't say whether this worked or not.

>I also call the SYSTEM form from MYINITIALFORM when a user wants to changes some system settings. It to traps the vAbort with:
>
>
>if vAbort=.T. then
>  thisform.release

Insert a RETURN here.

>endif
>
>
>The problem on this call is that the form is NOT releasing.. it is hitting that line and processing through it continuing on with the next line after the ENDIF, thus generating an error when it tries to do something with the missing system information. I know it is hitting the thisform.release because I have put a WAIT WINDOW in the if/endif loop to watch for it.

In addition to what JCF told you, why don't you move the checking of the records in the myinitialform into its .load? You can even create the table there if it's not found, return .f. from the .load if something's awfully wrong etc. You can set thisform.OK to .t. or .f., depending on any tests you may run there, and Return not Thisform.OK from its unload. You may decide to show the form or not etc all from within the form.

Thus you encapsulate the whole logic into that form, and have only two possible outcomes: your system table is OK, or the form returns .f.

Your main.prg logic may be thus be simplified to
do form myinitialform to vAbort
if vAbort
   quit
endif
do form mymainform

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform