Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Abstract classes useful?
Message
De
03/06/2008 16:17:22
 
 
À
03/06/2008 15:36:35
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:
01321423
Vues:
12
>Instead of only returning False in case this.class ends with an underscore, the class might display its documentation or a link to that documentation, before returning False in the init.
A more accurate way than simply returning false might be to write something in debugout, maybe even raise an error ERROR "instanciation of abstract class "+this.class.

I wouldn't display a documentation. If you code this.name = 42 you also don't get a documentation of this or the name property.

But in my interface class I have made a method documentation(). You can of course not call that from the abstract class, as you can't instanciate the abstract class and then call it's documentation() mehtod. But I programmed it in a way it prints it's own documentation and the parentclass documentation, so finally you got the whole class hierachy with docs for this class and all it's (abstract) ancestor classes.

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

Click here to load this message in the networking platform