Hi Sergey
It was my fault after all.
Thanks for the ref. it is a fine utility, though it gave me a clean chit for references as the form always closes w/ w/o the error <g>
Q1. Is my solution to the problem on the right track?
Just to clarify my doubts
Q2. Will THISFORM.oSetFocusPage be my responsibility to reset to .NULL. in form.destroy() ?
Q3. Or will the form release the THSIFORM.oSetFocusPage property?
Though I was not using ADDOBJECT(), CREATEOBJECT(), but the following:
Form.Refresh() -> Form.RefreshOnce() -> Form.EnableDisableControls()
IF TYPE("THIS.pgf.Page14") # "U"
WITH THIS.pgf.Page14
IF "ANEMIA"$UPPER(v_LKtPatients.cTest) OR "WIDAL"$UPPER(v_LKtPatients.cTest) ;
OR "FULL"$UPPER(v_LKtPatients.cTest)
.ENABLED = .T.
THISFORM.oSetFocusPage = THIS.pgf.Page14
ELSE
.ENABLED = .F.
ENDIF
...
ENDWITH
ENDIF
Form.txtINo.LostFocus()
DODEFAULT()
LOCAL loO
loO = THISFORM.oSetFocusPage
loO.SETFOCUS()
RELEASE loO
I didn't call RELASE loO, I was relying on the assumption that the local variable will be released when it goes out of focus.
>>It's okay but is there a utility that looks for dangling references, or any specific place to put set step on for the debugger that will show the unreleased stuff?
>>
>Check David Frankenbach's ObjRef utilty at
http://www.geocities.com/df_foxpro/qoop017.htm