Hi,
Here's my problem: Inside a COM object, I created a reference to another COM object. Here's the code:
<CODE>
DEFINE CLASS ncbi_webget AS CUSTOM OLEPUBLIC
oWeb = .NULL.
lTransfer = .F.
PROCEDURE Init
THIS.oWeb = CREATEOBJECT("InternetObject.HTTPConnection")
IF VARTYPE(THIS.oWeb) <> "O" THEN
THIS.lTransfer = .F.
ELSE
THIS.lTransfer = .T.
ENDIF
ENDPROC
PROCEDURE Destroy
RELEASE THIS.oWeb
ENDPROC
ENDDEFINE
</Code>
Pretty simple right? Except that I can't compile! I keep getting an error, namely:
RELEASE THIS.oWeb
Error in line 20: Must be a variable or array.
I tried changing the line by adding parenthesis to 'RELEASE (THIS.oWeb)' and it compiled fine but then I got a different error when I tried to release the second COM object at runtime (the instance of 'ncbi_webget').
I also tried this:
THIS.oWeb = .NULL.
But it still doesn't work!
How can I free the memory of my first COM object by releasing it from inside my second COM object?
Thanks a million, Stephane.