Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why won't this work???
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00685689
Message ID:
00685699
Views:
43
You have declared oObj as a Local Parameter in Testit() which I would expect to overide the "global" oObj. Remove the LPARAMETERS statement and declare oObj as PRIVATE ( PUBLIC is not needed ) or declare oObj as LOCAL and pass it to Testit() in the parameters list.

Bill

>Inside the function TestIt, I get "oObj is not an object"
>
>
>
>PUBLIC oObj
>
>oObj = CREATEOBJECT("MyObj")
>testit()
>
>FUNCTION testit()
>LPARAMETERS oObj
>
>  ? oObj.Test1
>
>RETURN
>
>
>
>DEFINE CLASS MyObj AS Custom
>
>  HIDDEN PROC Test1
>   RETURN "Hello"
>  ENDPROC
>
>ENDDEFINE
>
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform