Information générale
Catégorie:
Programmation Orientée Object
Versions des environnements
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement