Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Communications between controls
Message
 
 
To
09/07/2001 18:06:54
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, United States
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00528400
Message ID:
00528547
Views:
14
Because you are dealing with multiple controls, the most important feature is encapsulation. You will either want to use a container class or a control class. The primary difference is that with a container, you can still access the contained controls. With a control class, all of the controls at run time become on homogenoeous unit. If you are familar with the VB usercontrol, it is the same thing.

Whether you use a container or a control, the following applies. Have common methods at the container level that are responsible for updating and refreshing controls. Essentially, you are delegating the responsibility to the container to make sure all of the controls get updated and refreshed. This gets you out of a lot of inter-control communication. You also get out of the need for a lot of extra custom properties.

The nice thing is that whether you are changing the value externally or in the Valid of a contained control, the same code will work.

Finally, by using a container and not a form, you then have the flexibility of placing the class on a pageframe or on a different type of form. IMO, forms as the container for these type of forms are too implementation specific

Whether this is the best way or not, I don't know. It has worked for me and from design standpoing, I think it is pretty solid.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform