Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple Question
Message
De
11/07/2003 16:48:24
 
 
À
11/07/2003 16:30:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00809233
Message ID:
00809416
Vues:
37
This message has been marked as a message which has helped to the initial question of the thread.
AKhan,

It looks like the variables are going out of scope...IOW, once the init() method ends, all of those variables are gone.

One workaround *may* be to declare all those variables public before restoring from the memvar file, but this is a bad practice, and we'd have to send Jim Booth after you :)

Another option is to add a custom properties to your form to hold all of those values (manually setting the properties in the init(), and putting them back to variables before saving to the file).

Yet another option, (my favorite), is to lose the memory file completely, and find another place to store these values...such as in a table.

>
>Could you check this (VFP 7) if it happens in your machine. Then below is the contents of the memory file,my form is very simple with 2 spinner buttons and 2 command buttons Save and cancel
>
>in the init of the form i have
>RESTORE FROM "forms\quarter.mem" ADDITIVE
>thisform.spinner1.Value = m.mvcuryrminnhdba
>thisform.spinner2.Value = m.mvcuryrminhcdba
>
>in the save button i have
>SET ECHO OFF
>SET SAFETY OFF
>WAIT WINDOW "Please wait saving changes..." TIMEOUT .5
>m.mvcuryrminnhdba=thisform.spinner1.Value
>m.mvcuryrminhcdba=thisform.spinner2.Value
>IF TYPE('mvMasterupd')<>"N"
> messagebox('Corrupted')
>endif
>SAVE TO "forms\quarter.mem"
>Thisform.Release
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform