Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Correlations among VFP and OOP languages
Message
 
 
To
12/06/2006 04:16:52
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01128092
Message ID:
01128568
Views:
22
Thomas,

I agree totally with using a function instead of a method, this way the replicated code is reduced to just a single line of code that is the same in all classes. That's what I decided in VFP3 to use an ObjError( this, nError, cMethod, nLine ) function call in every first level subclass of the VFP base classes to route errors to a consistent handler that could be replaced on a project by project basis if needed.

Now if VFP would ever give us implements interface ... we could do some things better/easier. We could write a class builder that would basically apply an interface definition to a class.

>In quite a few OOP views your class based approach would called "better" - in my *personal* view just ANY (even nearly) redundant code is bad/worse and having a function enables me to create abstract classes without semi-redundant "function AbstractWarn()" methods.
>
>And on the matter on the program name, you were certainly right and I was without coffee and just typing without checking or deep thinking. See my reply to David for another try without coffee (I had left out the "not" in the if at first type - sigh <bg>).
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform