FIX: Buffering Lost when txtbtns Exit Clicked (167193)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
This article was previously published under Q167193 SYMPTOMS
When an application has more than one form, and buffer mode is other than 1
(unbuffered), the buffering will be lost under certain circumstances. This
happens when one or more of the forms uses the DataEnvironment, uses the
txtbtns class of the Wizstyle.vcx class library, and the Exit button is
clicked.
In Visual FoxPro for Windows versions 3.0 and 3.0b an error message appears
when the Revert button is clicked on the surviving form. The message says
"Function Requires Row or Table Buffering Mode."
In Visual FoxPro for Windows versions 5.0 and 5.0a there is no message, but
the "Revert" button becomes inoperative--a sign that there is nothing in
the buffer to revert.
CAUSE
Code in the DESTROY method of the txtbtns class resets buffermode to '1'
when the Exit button is clicked. This code is by design to prevent OLE
servers from updating general field data during the destroy event. The form
is to be released, so no more data changes should be posted to tables
involved with that form.
RESOLUTION
If the application does not have tables with general fields that are
subject to updating whenever the table is open, the line in the DESTROY
method of the txtbtns class that sets buffering to '1' may be commented
out.
The line is approximately 30 lines into the txtbtns.DESTROY method. It is
as follows:
= CursorSetProp("Buffering",1,.ALIAS) &&optimistic table buffering
The comment on that line is incorrect.
This change is not supported by Microsoft, and the results of any
modification to any of the code in the Wizstyle.vcx library are uncertain
because of the numerous dependencies between functions, values, and event
methods within the code of those classes. The user makes such modifications
at her or his own risk.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This has been corrected in Visual FoxPro
6.0.
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbbug kbfix kbprb kbprogramming kbvfp600fix KB167193 |
---|
|