General information
Category:
Object Oriented Programming
>But this is to our disadvantage. I think that if VFP were truer OO, all controls would indeed be subclassed from the same 'control' class.
I certainly agree with that, 100%! I've "solved" this problem by delegation, where each of my base control classes instantiates and calls methods of another class. That way, at least, I just have to put in the appropriate calls once, and can change the other class as I need to.
However, that's different from deriving each class (ultimately) from something like Object.
>>#3 might well be the best solution, if the concept of moving doesn't need to be treated polymorophically.
>
>But it does,
I don't think we can know that without knowing what the application is for. My impression was that choice #3 (and #4) wouldn't have been offered at all if polymorphic moving were a given.
My point in all this is that it's impossible to create an interface for these classes without knowing what's to be accomplished. It's not possible to create canonical forms for Vehicles, Cars, Boats, etc.
This may not be as obvious a point as it seems. I've seen many OOP texts that give examples like this without addressing the application.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only