Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why don't I see cleanup class?
Message
De
22/06/2002 16:18:02
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00671062
Message ID:
00671404
Vues:
15
Hi David,
I too set all my settings in the Private DS, but I still find that I need to change something and restore it when I'm done. Examples: I will need to re-Select() an alias, or I have to restore an On Error setting (those are the only 2 I can think of off the top of my head). How do you handle those kind of situations?

Also, it sounds like all of your methods ASSUME certain settings. I do the same thing, and I have always had this bug in the back of my mind that I was doing it wrong. I've always squelched the bug by reminding myself that I'm the only one that will ever work on my apps.


>Bill,
>
>I created a single SET management class while I was writing the PTF OOP book and included the code in there, because it seemed like a good thing to do...
>
>I've never used it...
>
>With the advent of Private DataSession forms, my Form class sets the values the way they should be and I don't even have to worry about restoring anything, because they are DS scoped.
>
>I rarely write code anymore that needs to do save/change/restore a SETting, so I've just never ended up using the class.
>
>>The advantage is: you don't have to remember to cleanup. When the procedure/method ends, the variable goes out of scope and the destroy() cleans up for you.
Bill Morris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform