Yes, that work, but take care of using more than 3 subclass levels, because sooner or later you could start having a nightmare with code maintenance and even strange errors. VFP doesn't always do a very good job with many subclass levels.
El 31/3/2017 16:22, "Paul Newton" Paul.Newton@pegasus.co.uk escribió:
Hi all
Let's say I have five classes (Class1, Class2 etc.) and that each class is a subclass of the one before it (class2 is a subclass of class1, class3 is a subclass of class2 etc.)
Now let's suppose that I have added a custom property (e.g. "MyProperty") to class3 and set its value to "Property3". At this point class4 and class5 will inherit the property MyProperty with the value "Property3".
Now I add the custom property MyProperty to class1 and set its value to "Property1" and everything is just fine.
Now class2 will inherit the property MyProperty with the value "Property1" and classes class3, class4, class5 will inherit the property MyProperty with the value "Property3".
I think that's great and potentially very useful because it means I can create a property at the top of the hierarchy without having to worry about whether a property of the same name has already been defined lower down the hierarchy.
Paul Newton
[excessive quoting removed by server]