Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to save user's environment
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00535841
Message ID:
00535889
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
>>In my form baseclass, I have the following in the Form RELEASE:
>>if This.lSaveFormSettings
>>   if vartype(goApp) = "O" and !isnull(goApp)
>>      goApp.SaveFormSettings(This)
>>   endif
>>endif
>>I also have a form property called lSaveFormSettings that is set to FALSE if I do not want to enable this feature for the current form. goApp is my global application object. This method actually does some minor stuff then calls another method in a PRG based class that does all the saving of the form environment. Since I pass an object reference to the form, I can get to any object and property on the form.
>
>Thanks, Mark. Seems like a way to go. Do you also have a RestoreSettings methods of your global object? How do you handle multi-user problem? Do you store info in a table (memo fields, similar to ideas showed by Robert) or you use some system files? Where do you usually store them?
>
>Sorry for all these questions, but I'd like to hear more details, if possible.
>
>Thanks again.

Oops. Yes, I also have a Restore method in that same PRG based class. I have the following in the form INIT:
if vartype(oApp) = "O" and !isnull(oApp) and (This.lSetFormSettings or oApp.Language <> ENGLISH_VERSION)
   oApp.SetFormSettings(This)
endif
I save all the settings in a table. I have a field for UserID [integer], FormName [M], and a memo field for general form properties like Top, Left, Height, Width. So multi-user is not a problem.

For your situation, you would need more fields to save settings of objects on the form.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform