Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why don't I see cleanup class?
Message
De
21/06/2002 13:45:47
 
 
À
21/06/2002 11:58:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00671062
Message ID:
00671156
Vues:
15
I've used Visual FoxExpress so much that I've been spoiled. It has its own environment class that does exactly that. When I've been forced to code in vanilla VFP (like I am now :o(), I tend to create a setup environment routine and a cleanup environment routine, because that is generally the code I have inherited from other developers.

Tracy

>Every time I see code written by someone else I always see things like:
>
>Procedure ??
>  lcTalk = Set('Talk')
>  Set Talk Off
>  .........
>  Set Talk &lcTalk
>EndProc
>
>Is there a reason people don't use a class to save & restore settings
>
>Procedure ??
>  loTalk = CreateObject('Save_Talk')
>  .....
>EndProc    && Local variables go out of scope forcing destroy()
>Define Class Save_Talk as Custom
>  cTalk = Set('Talk')
>  Procedure Init()
>    Set Talk off
>  EndProc
>  Procedure Destroy()
>    Set Talk This.&cTalk
>  EndProc
>EndDefine
>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform