Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird GETNEXTMODIFIED(0) and buffered views
Message
From
23/11/2002 17:27:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Weird GETNEXTMODIFIED(0) and buffered views
Miscellaneous
Thread ID:
00726203
Message ID:
00726203
Views:
70
Hello,

I have a remote view populating a grid. The form has a 'Cancel' command button. In the click event of the Cancel button I have:
IF THISFORM.QueryUnload() && this one can return .F., depending on user's choices
THISFORM.Release
ENDIF
The QueryUnload method:
SELECT myView
GO TOP
IF GETNEXTMODIFIED(0) # 0
* Ask the user if he/she wants to save the changes and proceed acordigly
ENDIF
RETURN
The grid has the focus. No other operations are done. I am positive about that.

I don't understand why GETNEXTMODIFIED() pops up showing some modified records even I simply scroll the grid, using cursor keys. More than that: if I do _not_ scroll the grid, but press the Escape key, GETNEXTMODIFIED pops up; but if I press Alt+Cancel button's hot key, it doesn't pop up. It looks to me the records change their 'changed' condition no matter if the user changes the record or not.

The second problem: suppose I have the same view in DE, and some controls bound to it. If a checkbox, bound to a logical field, set as .Readonly = .T., is clicked, GETFLDSTATE and GETNEXTMODIFIED keep pointing the record, even no change is made.


I know how to workaround those two problems, but my question is why these things happen and how to avoid them.

Any idea is appreciated.
Thank you.
Grigore Dolghin
Class Software.
Reply
Map
View

Click here to load this message in the networking platform