Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Good design advice with containers on pageframes.
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00241405
Message ID:
00242648
Views:
26
Gary,
Jeff's suggestion of Jim Booth's book is an excellent one. However, I'd also suggest you do some experimenting with simple containers to understand how inheritance works in this case.

1. Any properties or methods added to a container class will be inherited if you subclass it.

2. If a control on your MyTrips container is based on (for example) your MyTextBox class, any changes you make in MyTextBox will be seen on the control on your container.

3. If you subclass the MyTextBox control as MyDateTextbox, this will NOT be seen on the MyTrips container.

I found it helpful to draw a diagram linking each control to its original source. Then inheritance became much clearer.

I still don't understand why you are concerned about your application classes are in containers. Personally I find this approach very useful as I CAN drop the container onto forms, pages, etc. at will. Keep in mind that your container class will be IN a vcx file, just like your individual control classes. It's not a matter of 'container or vcx'.

Do try a few experiments with simple containers. It'll help you understand it much faster.

HTH
Barbara

>Hi Barbara
>
>Thanks for responding.
>
>The controls in the container represent individual, defined classes. If you take the pageframe out of the equation, I might create and develop a "Client" class, a "Vehicle" class and so on in a .VXC. The properties and methods of the class are contained in the .VCX. Therefore I could subclass the .VCX for more specific behaviour later.
>
>However, the application demands that these classes basically reside on pages in a pageframe. As the framework utilises a reference to a container in which to instantiate the contents of each page in a page frame, I appear to be reduced to developing application "classes" with their associated behaviour in containers and not .VCX's. Do VFP developers routinely develop their application classes in non-form containers ie., a "pucker" container? Would I be right in assuming that by developing application classes in a container, they can be dropped on to a form or a page in a pageframe? If properties and methods of the class are created in the container, if I later subclass the container, I will inherit the container behaviour but the controls will not be subclassed? Is this what happens?
>
>My preconception is that re-usable application based classes are developed in .VCX's whereas now it appears that they should be developed in containers that can be in turn dropped on modal/modeless forms or pages in page frames.
>
>Help !!!
>
>Yes, I am a 2.6'er and relatively new to VFP <g>.
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform