Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cool idea for SET commands
Message
De
12/08/2004 12:45:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/07/2004 10:25:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00928029
Message ID:
00932805
Vues:
26
...
>>
>>Kevin,
>>Forgive me but personally I find such a class unnecessary. It makes you feel you're doing OOP maybe but that's all I can see.
>
>Cetin,
>
>Why do find it unnecessary?

No solid reason. I don't want to heat waters accept it as personal preference :)
I find it unnecessary because 'set' commands seldomly need a change along the code. I've a series of set commands that're effective for each form (and I use private datasessions almost always). Seldomly I need to change one or two in a form. I've already memorized my default settings (and you might say what about those maintaining your code - no answer), if for example as in Kevin's sample I need to set talk on :
set talk on
...
set talk off && which is my default
Another reason is I find it very hard to write a class for the job. Not all set commands are as straightforward as set talk on/off. ie: consider set century, set reprocess etc
And yet another reason is maintanence. If I were reading someone else's code with :

o = createobject("SetCommand",'TALK','ON')

I sure would spend time to understand what it's doing. Also in code it need be (at least similar and heavy enough):
local o
o = createobject("SetCommand",'TALK','ON')
...
release o && I might well and high probably would forget to have this
*o = createobject("SetCommand",'TALK','OFF') && or this
...
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform