To all VMP users (Mike Yearwood for one):
Maybe you can explain this code to me (snippet only, full code in frmData/.IsBufferDirty()):
IF NOT EOF(m.lcAlias)
LOCAL lcGetFldState
lcGetFldState = GETFLDSTATE(-1, m.lcAlias)
IF ('2' $ SUBSTRC(m.lcGetFldState, 2)) OR INLIST(m.lcGetFldState, '2', '3', '4')
RETURN .T.
ENDIF
ENDIF
If I read this correctly, if you get this far in the code, you are NOT on an appended record and the IF statement reads like this:
IF "2" contained in the lcGetFldState string skipping the deleted flag or
IF lcGetFldState is a 2 or 3 or 4...
then there is a change in the buffer.
I stumbled at using INLIST() because it only works accurately if SET EXACT is OFF (which it is in the app by default it seems). And if we have already checked for an appended record earlier, why check for the existance of 3 or 4?
Either I don't understand the code or it is really old and should have been updated.
Thanks for any insights.
Albert