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:
00174214
Views:
26
Terry,

I'd try and steer you away from code that is that order dependent. If you use the Send To Back and Bring To Front you can control the order of the records in the SCX, but again this isn't an optimal solution.

The Refresh() event is designed to allow a control to reflect a change in it's underlying ControlSource, ie a record navigation. It sounds more like you need to be using the Valid(). But the order dependency can still be really bad. Users can use the mouse to sequence through controls in any order they feel like.

If you've got several controls to validate as a group in a particular order I'd use one custom Form method that processed each control in order, if invalid data is there the method can SetFocus() to the appropriate control. Then all of the controls Valid() methods just look something like:

DoDefault()
return thisform.Validate()

>I have had a consistant refresh order problem I could use a solution to.
>
>
>I place several objects on a form using the form designer. They display in the object picker dialog in say the following order:
>
>o1
>o2
>o3
>...
>
>Later I add, move and delete objects. The order looks like this:
>
>o1
>o2
>o5
>o6
>o7
>...
>
>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.
>
>I have thought of doing a direct USE on the form SCX and re-ordering the records manually based on their object order but this is clumsy and requires that I remrmber to do it after each form change.
>
>I am looking for a more elegant solution.
>
>
>Thanks
>Terry
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform