Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Abstract classes useful?
Message
De
04/06/2008 14:12:57
 
 
À
04/06/2008 12:29:38
Thomas Ganss (En ligne)
Main Trend
Frankfurt, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01320973
Message ID:
01321670
Vues:
14
I've rather changed my mind during our discussion to not allow such classes that get concrete at runtime. Now I am a bit undecided again.

You introduce a possibility to override IamConcrete() simply with RETURN .T., my proposed init() method can be overridden too, but you seldom use a class overriding it's init behaviour. And once you set the classname you can't change it.

Concrete or abstract should be clear beforehand, like a method should not dynamically be public or private...

On the other side you wouldn't want to define N concrete buttons, each only differing in the method name set in it's cAbstractFormClickmethod property. In a dynamic language like vfp you would want to have such dynamic behaviour and so it should be allowed. the way out could be you define that dynmic class to be concrete, even though it could stay abstract, if it's not initiated correctly.

Bye, Olaf.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform