Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I know is the refresh method is with code?
Message
De
21/04/2000 08:09:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00361618
Message ID:
00362175
Vues:
16
>I was thinking a bit and rather than put the code in the textbox refresh, I could be better in the value_assign, like:

ALthough it looks like the perfect place for it, there are several issues with Value_Assign that make it a bad candidate for this, IMHO. Having any code at all in the Value_Assign method of a class causes the GETFLDSTATE setting for the bound field to change when the refresh runs. This iwll make it look to you like your user has changed the value in the field, even if he hasn't. ALso, there are a couple of situations where Value_Assign doesn't when you would expect, so I don't think it will do the job satisfactorily. You are, of course, welcome to try.

My base textbox class has a custom method called anychange that is called from both the InteractiveChange and ProgrammaticChange events at the class level. This way if I need code to run no matter how the value changes, I can put it in the AnyChange method. You can also choose to call it from the Refresh method to cover all your bases.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform