Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which method fires ControlSource?
Message
De
22/06/2016 12:59:47
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01637465
Message ID:
01637579
Vues:
47
>>In this case, I have a suggestion: create a form property and bind your control to it. Then in the event of the PK change (which you would control anyway) change this value to whatever you want. This way the code to change the value runs only when it needs to, not on every refresh.
>
>My line from above "I also store the 'last' PK value to the textbox property and only Seek when this PK value changes. " indicates that 'my' code in refresh indeed runs only when PK value changes. Also, you assume that I control the event of the PK change but it is not so. User can move the record pointer in many places (which changes the PK value). Another thing is I want this class I created to work in any form and not to have to bind each one to a form property. That is, I want all 'my' code to be in just one place - Refresh method - and that is all.

If user does something, your code reacts to it and assigns the value to this property. You have a choice of bindevent() to the things user may do, or having an _assign method for this property etc. There are ways to avoid having the code in .refresh() doing any checking.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform