Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Abstract classes useful?
Message
From
04/06/2008 14:12:57
 
 
To
04/06/2008 12:29:38
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
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:
01321670
Views:
13
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform