Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why won't this work???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00685689
Message ID:
00685700
Vues:
29
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform