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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only