>I have a form that needs to execute code in a class that isn't part of the form, but I can't get it working.
>
>In the forms init I say:
>
>set classlib to myclasses
>createobject("mycontractsletters")
>
>To call one of the methods of the class called mycontractsletters
>I am doing this:
>
>THISFORM.mycontractsletters.umnb1() && umnb1 is method I need call
>
>I am getting mycontractsletters is not an object. Obviously I'm not doing this correctly, but what is the best way to do this?
>
>Thanks!
>
>John.
John, you need to give the instanciation a 'name'
set classlib to myclasses
oConLetter = createobject("mycontractsletters")
THISFORM.oConLetter.umnb1()
Note that the object name is what is referred to in the method call.
HTH