Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing bound control value and buffer
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Changing bound control value and buffer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01507653
Message ID:
01507653
Views:
107
Hi,

I have come across the following issue and hope that I am missing something simple. Here is the summary of the situation:

A textbox on a form is bound to a cursor with buffering 5. When user changes the value of the control the method InteractiveChange of the textbox calls a method of the form. This method checks if there are any changes in the buffer using
cRetVal = GETFLDSTATE( -1, "C_CURSNAME" )
And the return from GetFldState() has all "1"s as if nothing has been changed.

Yes, if I put SET STEP ON in the method and step through the code, the GetFldState() returns the string that has one "2" as it should be. My question is, why without debugger the GetFldState() does not see any changes and with the debugger it does? I also tried using CURVAL() for the field and the same thing happens. Without debugger the CURVAL() returns old value but with the debugger the change is perceived.

UPDATE. Looks like calling REFRESH() takes care of the problem.
UPDATE 2. No, REFRESH() does not solve the problem.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform