Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buttons on toolbar
Message
From
21/10/2000 10:30:39
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00431510
Message ID:
00432475
Views:
26
Hi Jim

>Actually, late composition (which is the better design approach) says that you don't subclass any containers that have anything in them. You create a class hierarchy for the container and you create classes for the contained objects. Finally you assemble the container with objects and then use that. You amy have many different assembled containers with different objects in them. You never subclass a container that has anything in it.

Hmmm, this sounds very strange to me. Can you explain a bit more about this 'late composition' ? What is the reasoning behind this concept ?

Does this apply to all containers like forms, toolbars, controls, containers etc ? Are you saying that I should not make a class of a container containing objects or that I should not subclass a container ?

Let's say i've developed a moverbar class which consists out of two lists, four buttons and two labels. How do I define this movebars class without putting it in a container ? Let's say that this is an abstract class, and I subclass this one for moverbars with different layouts and behaviour ? How would I do that ?

Another example: If for my resizeable baseform, I want derived form to have grip in the lower right corner, I add a grip control. Why shouldn't I subclass the baseform now it contains a control ?

If in a project a certain conbination of textboxes and labels occurs at various points, Why shouldn't I create a class of this combination and why should I not use this class for subclassing ?

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform