Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Navigator
Message
De
30/01/2001 12:33:29
 
 
À
29/01/2001 10:26:30
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00469698
Message ID:
00470170
Vues:
31
Chuck:

As someone else pointed out, the current work area can sometimes change on you when you are using grids. An easy to circumvent some of the problems is to specify the table alias in all your GO, SKIP, RECNO, BOF, EOF to ensure that all data pointer movement and checking occurs in the desired table.

If you have more than one form that uses your navigation buttons, I suggest that you create a custom property named something like MasterAlias (at the class level if your forms are based on a subclass of the VFP form, at the Form level if they are based on the VFP form) and that you store the table alias of the master table in that property. Assuming your buttons are saved in a class library (you can always select them and use File, Save As Class) you can then
code something like GO TOP IN (THISFORM.MasterAlias) in your Top button, etc... and have the absolutely nothing to code in the Click event of this button on any of your Forms. Class methods are usually a little bit more difficult to write because they have to be more generic but you will find that they are easier to maintain (you change the code only at the class level, there is no need to open all your forms). They will save you a ton of coding effort in almost any project and even more so if you reuse them in other projects.

Good luck,
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform