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:
00685700
Views:
30
>Inside the function TestIt, I get "oObj is not an object"
>
>

>
>PUBLIC oObj
>
>oObj = CREATEOBJECT("MyObj")
>testit()
>
>FUNCTION testit()
>LPARAMETERS oObj
>
> ? oObj.Test1
>
>RETURN
>

You've setup your testit() method to accept a parameter (scoped local) called oObj. However, when you called testit(), you didn't pass it any variables. So, oObj is set to a local .F. in the testit() function. Local variables have precedence over public ones (that is, VFP will use the locally defined variable instead of the public one).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform