Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom writebuffer
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00018427
Message ID:
00018428
Views:
30
>Hi,
>
>I'm having trouble with my custom write buffer.When I am on a record and make changes then go to the next record using my toolbar the writebuffer traps for changes and allows me to commit or revert my changes. But if I were to make changes then select my listbox and go to another record, the changes are already committed. How do I check if data has changed in any of my text boxes and prompt the user to save, discard or cancel the last action?
>
>TIA
>Jon

Jon,

This happens because you are still on the same record when you clicking your toolbar, and your WriteBuffer fires OK,
But when you move record pointer through the listbox and use row buffering, the changes are written automatically, right, and you can do nothing about that.
The solution may be to use table buffering, if it suits. When you move
the record pointer through listbox you may trap this, for example,in Listbox InteractiveChange event, and use GETFIELDSTATE() to check, if particular field was updated then ask for confirmation, and then force TABLEUPDATE() to update current record. It may be complicated, if you have many fields to update.
In case of row buffering, may be you can put the trap to Listbox GotFocus(), that just off the top of my head, I didn't try it :)
Well, just some thoughts.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform