if .T.;
and Type('m.thisForm.wlPropsRestore') == 'L' AND m.thisForm.wlPropsRestore;
and Used(m.lcAlias);
and CursorGetProp("Buffering", m.lcAlias) > 0;
and lField(m.lcField, m.lcAlias)
lnFldState = GetFldState(m.lcField, m.lcAlias)
llFldState = Vartype(m.lnFldState) == 'N'
endif
GetFldState(m.lcField, m.lcAlias) will throw an error if m.lcAlias is not buffered. In the test to insure buffering we have CursorGetProp("Buffering", m.lcAlias) > 0, which is always TRUE as CursorGetProp() returns a number between 1 and 5. Should this be CursorGetProp("Buffering", m.lcAlias) > 1?
- James
You're probably right, looks like a bug on a quite old code snippet.
Strangely no one ever hit it before
Thanks!
During testing I got a "Function requires buffered tables..." error, so I dug around some code I can't explain. In awcbo.ListIndex_Assign the following snippet:
if .T.;
and Type('m.thisForm.wlPropsRestore') == 'L' AND m.thisForm.wlPropsRestore;
and Used(m.lcAlias);
and CursorGetProp("Buffering", m.lcAlias) > 0;
and lField(m.lcField, m.lcAlias)
lnFldState = GetFldState(m.lcField, m.lcAlias)
llFldState = Vartype(m.lnFldState) == 'N'
endif
GetFldState(m.lcField, m.lcAlias) will throw an error if m.lcAlias is not buffered. In the test to insure buffering we have CursorGetProp("Buffering", m.lcAlias) > 0, which is always TRUE as CursorGetProp() returns a number between 1 and 5. Should this be CursorGetProp("Buffering", m.lcAlias) > 1?
- James
-- thn (FoxInCloud)
Thanks - James
James,
You're probably right, looks like a bug on a quite old code snippet.
Strangely no one ever hit it before
Thanks!
During testing I got a "Function requires buffered tables..." error, so I dug around some code I can't explain. In awcbo.ListIndex_Assign the following snippet:
if .T.;
and Type('m.thisForm.wlPropsRestore') == 'L' AND m.thisForm.wlPropsRestore;
and Used(m.lcAlias);
and CursorGetProp("Buffering", m.lcAlias) > 0;
and lField(m.lcField, m.lcAlias)
lnFldState = GetFldState(m.lcField, m.lcAlias)
llFldState = Vartype(m.lnFldState) == 'N'
endif
GetFldState(m.lcField, m.lcAlias) will throw an error if m.lcAlias is not buffered. In the test to insure buffering we have CursorGetProp("Buffering", m.lcAlias) > 0, which is always TRUE as CursorGetProp() returns a number between 1 and 5. Should this be CursorGetProp("Buffering", m.lcAlias) > 1?
- James