Re: Odd buffering behaviour
- From: "Dan Freeman" <spam@xxxxxxxxxxxxx>
- Date: Thu, 24 Aug 2006 08:51:22 -0700
Sounds like getfldstate() is looking at the wrong alias. (Do you have a grid
on that form?)
Make sure you pass getfldstate() the 2nd parameter, which is the alias you
want to check.
Dan
Tim Hobson wrote:
Using VFP6 I am trying to save changes made on a form.
Multilocks is set ON
The table buffermodeoverride in the dataenvironment is 1 (use form
setting)
The form buffermode is 1 or 2 (I have tried both)
The save button calls the following code:-
? getfldstate(-1) && used to see what is happening
lccheck = getfldstate(-1)
IF '2' $ lccheck or '3' $ lccheck && a change occurred
messagebox('OK')
= tableupdate(0,.T.)
ELSE
= messagebox('Nothing to Save', 0, _screen.caption)
=tablerevert(.F.)
ENDIF
thisform.cmddone1.setfocus
thisform.REFRESH()
Strangely, when I save and whether I have made a change or not,
lcheck=1111111 (no 2 or 3, which indicates no change made). I
therefore get the message 'Nothing to Save'.
BUT if I suspend the program before saving and enter ? getfldstate(-1)
in the command window, I get 1111211 showing a change has been made.
Now, resuming and pressing Save works, lccheck correctly saves to
1111211, and I get the message OK.
What is happening ? Advice please.
.
- Follow-Ups:
- Re: Odd buffering behaviour
- From: Tim Hobson
- Re: Odd buffering behaviour
- References:
- Odd buffering behaviour
- From: Tim Hobson
- Odd buffering behaviour
- Prev by Date: Re: hidden class code
- Next by Date: Re: The application failed to initialize properly (0xc0000006).
- Previous by thread: Odd buffering behaviour
- Next by thread: Re: Odd buffering behaviour
- Index(es):