Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Abstract classes useful?
Message
From
03/06/2008 16:17:22
 
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01320973
Message ID:
01321423
Views:
11
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform