Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Name Calling Conflict - Don't Call Me That
Message
De
23/05/1997 14:21:42
 
 
À
23/05/1997 09:22:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00033110
Message ID:
00033452
Vues:
50
Someone recommended I use AddObject but by mistake I used CreateObject() and it worked. I'll start from the beginning.

I need to use both a class in forms and by regular programming. The problem was that when using the programming method:
oProg=CreateObject("myobject")
oProg.dowhatever()

But for the screen:
thisform.dowhatever()
*
*
The problem was "oProg" versus "thisform" from within the screen.

Edward Pickman (many thanks) recommended using AddObject() within the form itself and that worked (except I used CreateObject by mistake which also worked).

I just put into the LOAD() method:
PUBLIC oCs
oCS =CREATEOBJECT("cs")

and this works fine.

Now throughout the form I can just use
oCS.myProperty or oCS.myMethod just as I do programmically.

Thanks to all for this discussion.
Gene
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform