Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with buffering / tablerevert() / getfldstate()
Message
 
À
07/09/1999 03:33:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00260571
Message ID:
00261877
Vues:
25
Cetin,

Close but not exact. A control updates its controlsource just before its valid fires. The valid fires just before the control loses focus. Toolbars NEVER get focus, so clicking the toolbar button does not move focus off the current control. The solution is to simply SetFocus to the current control. This causes the control to momentarily lose focus and then gain it again and update its controlsource.

In the original message the sequence of events is;
1. Change the value in the control
2. Click the toolbar button
3. TableUpdate or TableRevert
4. Move focus off the control, which causes the control to update its  
   controlsource and dirty the buffer again.
To solve this problem you can add these lines of code to all toolbar buttons.
IF TYPE("_SCREEN.ActiveForm.ActiveControl.Name") = "C" AND
   PEMSTATUS(_screen.activeForm.ActiveControl,"SetFocus",5)
   _screen.activeform.ActiveControl.SetFocus()
ENDIF
... The rest of the button code here
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform