>>Dont base an object on this class is really what
>
IF isabstract(This,This.class)
> debugout "instanciation of abstract class "+This.class
> error "instanciation of abstract class "+This.class+" is not allowed"
> Return .F.
>endif
>
>>is about. Whatever that isabstract() function would check.
>
>Yupp, when "instance subclassing" you'd need to overwrite that method, as the aforementioned check on left(this.class, 1)="_" would still fail, as the parentclass is still the abstract one. From that POV you can argue that it is not "really" a abstract class since overwriting the mangled methods makes it concrete.
Or you define instance subclassing as not valid enough to make a concrete class of an abstract one. So you'd burden yourself to make one more subclass before using it on a form.
Be aware that the value of this.class is always the class that is instanciated, even if the code checking this.class is inherited, it's not checking This::class, it's checking this.class. So subclassing "abstract_" with that code in init as "concrete" you don't need to overloading that init, the concrete class will instanciate. I think if you want abstract classes to behave as they should, eg fail to instanciate, it's better to have such behaviour than nothing, even if it might not work in every situation.
Bye, Olaf.