Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox valid/lostfocus fires before interactivechange?
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Combobox valid/lostfocus fires before interactivechange?
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 10
Divers
Thread ID:
01665845
Message ID:
01665845
Vues:
142
Maybe this has never mattered before, but I haven't noticed it until now:

I had code in the lostfocus method to add what a user typed into the dropdown list dynamically using additem(). This worked great until I added some code into the valid for this class. As I've been debugging, I noticed that typed information now gets wiped out when leaving the field. I tried adding some debugging code into the interactivechange to see if I could use additem there. When I step through the code, it appears that the interactivechange method begins to fire, but the valid takes over, then the lostfocus, then finally gets back to the interactivechange. Worse, after the valid finishes, the displayvalue for the control is blanked and consequently, so becomes the value, thus blanking the control, so there is nothing there for additem().

However, as far as I can see, when I set coverage logging on, it appears to log what I expect (simply runs interactive change until moving out of the control, but the control still blanks out. What would cause the control to lose focus during an interactive change?

I had a keypress event in the form, which I suspected was causing trouble. I've taken that out and still have the same behavior.

if I have no code in the valid, then the lostfocus has a this.displayvalue and the text is added to the list and still displays in the control. Adding anything to the valid breaks this behavior. What in the world am I missing? Any advice would be greatly appreciated!
Steve Howie, owner
DaSH Technology
Denver, CO
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform