Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with buffering / tablerevert() / getfldstate()
Message
 
To
07/09/1999 03:33:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00260571
Message ID:
00261877
Views:
26
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform