Many times folks ask for new VFP features that, after consideration, prove to be unneeded or logically unsound. I would like some opinions on this one.
Objects based on classes from VCX class libraries can always be created with one statement.
o = NEWOBJECT("MyClass", "TheClassLibrary.VCX")
Even when MyClass is a subclass of another class in another VCX, this works because the parent's VCX is pointed to from MyClass.
However, with PRG based classes the only way we can specify a parent class is to SET PROCEDURE TO ParentClass.PRG. Why can't we have syntax that allows the PRG based Class to know where to look for its parent? Example:
Test101.PRG
DEFINE CLASS Abstract AS Custom
PROCEDURE SomeThing(x)
ENDPROC
ENDDEFINE
Test102.PRG
DEFINE CLASS Concrete AS Abstract FROM Test101.PRG
PROCEDURE SomethingElse(x)
ENDPROC
ENDDEFINE
What I'm proposing is that PRG based classes work exactly like VCX based ones. Each class definition needs to know where its parents are.
Charlie