Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh order problems
Message
 
To
08/01/1999 13:25:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00174120
Message ID:
00174406
Views:
28
Hi Terry,

>Now I need to do validation on say object o2. o2 is phisically below the other objects on the screen, is later in order than the other objects, and is dependant on information in o6 above it (physically). When I use the information from o6 to validate o2 during a refresh I endup validating based on out of date information which has not yet been refreshed. My solution up till now has been to re-refresh o2 in the refresh method of o6 to get it to work correctly - very inefficient and VERY hard to maintain.

In this case I'd use a mediator pattern. It's a design pattern than encapsulates dependancies between object and therefore reduces the sort of coupling you experience. Usually it's implemented as a separate class or within the form.

For example you could create a method Validate() which receives the object name as parameter. Within this class you can write all the dependencies. This means still that you have to maintain all dependecies, but they are all in one place and therefore easier to maintain. The part for o2 for example could be:

Case tcObjName == "O2"
Thisform.o6.Refresh()
Thisform.o2.Refresh()
llValid = Thisform.o2.Validate()

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform