Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's happening here ?
Message
De
27/02/2005 12:54:50
 
 
À
27/02/2005 11:21:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Divers
Thread ID:
00990234
Message ID:
00991006
Vues:
16
Hi,

>>
Underscoring this thread is that it's very questionable practice to put *any* VFP expression in class constructor code, unless you really know what you're doing. Why? Because that code is "run" (such as it is) when the first object is created, and never again while that class definition is in memory.

I'm glad to see that at least VFP 9 prevents you from doing this with *objects*. In a code review, I would flag *any* use of an expression in constructor code for examination.
>>

But VFP9 doesn't prevent it. It tells you it's illegal then goes ahead anyway..

IAC, the behaviour could be useful. Maybr it might make more sense to change things so that an object *could* be properly created in this way - it would be a simple way of giving all instances of an object the ability to share properties, variables or data.

Regards,
Viv
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform