Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error : Illegal redefinition of variable
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01579124
Message ID:
01579758
Vues:
53
>Then I would prefer properties on the application main object and use late instantiation when accessing the property the first time. For instance
>
>LOCAL loLogger AS ErrorLogger of Logger.vcx
>loLogger = poApplicationControl.ErrorLogger
>loLogger.DoLog("Error message...")
>
I posted in Foxite long ago about this, to me is just a case of semantics, there is no difference between a PUBLIC poApplicationControl object with a PUBLIC property called ErrorLogger and a PUBLIC variable called ErrorLogger, in fact I would argue that an object should have NO public properties at all (this is probably for I learned OO long time ago using Smalltalk). Anyways, for the global object approach, that many people mentions, to have some usefulness it should be a much complex class and not only one full of PUBLIC properties but one that restricts the access and assignment of PRIVATE properties, for example I think it is better.
LOCAL loLogger AS ErrorLogger of Logger.vcx
loLogger = _SCREEN.ApplicationControl.getErrorLogger()
loLogger.DoLog("Error message...")
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform