Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetFldState and Escape
Message
From
27/07/1999 15:29:54
Beth Wetherbee
Virginia Beach Public Schools
Virginia Beach, Virginia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
GetFldState and Escape
Miscellaneous
Thread ID:
00246822
Message ID:
00246822
Views:
39
I've stumbled across what seems to be an odd behavior, and I'm wondering if anyone can explain it to me. In short, hitting escape while in a textbox bound to a view field sets getfldstate for that field to 2.

To see this behavior: Create a plain-Jane no-frills view. Then create a plain-Jane form, and put the view in the DE, using optimistic table buffering. Stick a text box on the form, bound to one of the view fields. Run the form, put the cursor in the textbox and hit escape. Then open the debug window and look at getfldstate(-1). There's a 2 there for that field. If you use a table and optimistic table buffering, it doesn't happen. If you use a view and optimistic row buffering, it doesn't happen. And most interestingly, if you go to the keypress event of the textbox, test for the escape key and then issue NODEFAULT, it doesn't happen.

This is driving me batty because my users will make their changes, hit the save button, and then hit escape to close the form. Because my forms look at getfldstate to see if changes have been made, it keeps asking them to save their changes, which of course makes them worry that their changes are not being saved.

Has anyone else run across this? Am I doing something wrong?

TIA,
Beth
Beth Wetherbee, MCSD
VBCPS
Reply
Map
View

Click here to load this message in the networking platform