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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement