Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
10 Things to Avoid in VFP Development
Message
De
04/01/2000 02:08:49
Walter Meester
HoogkarspelPays-Bas
 
 
À
04/01/2000 00:53:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00310318
Message ID:
00312188
Vues:
31
Albert,

>>Jim,
>>
>>The FOR clause is eqiuvalent to the SET FILTER approach IMO. The filtered grid thing IMO is the same as a BROWSE FOR command. Since we can't use a BROWSE as an Object, a SET FILTER in combination with a grid comes in.
>>
>
>It is NOT equivalent, the SET FILTER stays in effect after the operation has been performed. This is a negative side effect that should be avoided. Many of the SET commands are dangerous because they can change the way that code is evaluated and they can change at anytime durring program execution. I would prefer some sort of scoped construct that automatically resets the previous setting automatically.


You're right on the scope thing, but i'll hope you've got the idea. set filter is scoped to the current work area, the for clause only to the command used. Depending on which behaviour is desired you might use the FOR clause or the SET FILTER approach.

about the dangerous SET COMMANDS. I find the scope behaviour of certain SET commands very dangerous. like SET DELETED, SET TALK, SET CENTURY (VFP 5) etc. IMO they default to the wrong value, theirfore you easely make the mistake to not set them in another datasession.

Walter,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform