Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5 - C000005 Error at READ EVENTS
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00764127
Message ID:
00764769
Views:
33
Bhavbhuti,

See my replies inline below

>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?

I don't see what is the solution?

>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?

Yes, it's your responsibility to releasy any references to form objects stored in form properties. It's good idea to release any references stored in the properties. Check fox.wikis, when it comes back, for discussion on this topic.

>
>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()
>
>*** this line I just added
>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.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform