Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why cannot use & with Thisform.SomeProperty
Message
De
07/05/2009 06:43:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01397844
Message ID:
01398304
Vues:
79
>>>Greg,
>>>
>>>Sorry to disappoint you, but in your case you should have been using name expression instead.
>>>
>>>E.g.
>>>
>>>replace (lcFiledName) with lcValue in (lcAlias) && this is much better and safer syntax
>>
>>Actually this is very unsafe syntax. It should be:
>>
replace (m.lcFieldName) with m.lcValue in (m.lcAlias) && this is much better and safer syntax
>>to be safe. However, majority use the unsafe way. My .02 cents.
>>
>>Cetin
>
>You mean in case there are table fields named lcFieldName, lcValue, or lcAlias? IMO anyone who would name fields that deserves all the trouble they get, hastening their transition to driving a cab for a living ;-)

That would be pretty ugly, but some of the applications I've taken over have had some awful design issues. More to the point, it's a good idea to have a set of standards for how you write code, and to base those standards on writing the safest code possible. I've worked hard in the last few years to get in the habit of always using m. when it could make a difference. It's a good habit and I'm sure that in my current app, it has saved me a ton of grief.

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform