Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Levels of code
Message
 
À
10/09/1997 11:37:53
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00049335
Message ID:
00049347
Vues:
53
>I have some navigation buttons (first,next,previous,last) that are in their own class so I can use them on my forms. They have standard code in them at the class level to move the record pointer accordingly. My question is can I add additional code for individual buttons on my forms which executes after the "base" code from the class definition or do I have write the complete code for each button?? (see my example below)
>
>Eg. My "Next" button should go to the next record but also grab a new value for a variable and requery my data (in a parameterized view) in a grid which should change as the data the "Next" button changes.
>
>mtia!
>Mandy

Hi Mandy,

What you need to use is the scope resolution operator (::) like so:

Navbtns::NextBtn.Click && runs the NextBtn.Click method of the Navbtns class

{your additional code follows

You can place the line Navbtns::NextBtn.Click anywhere in the method you want ie:

{your own code first}
Navbtns::NextBtn.Click
{more of your code after}
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform