Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a class methid from a form
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00093302
Message ID:
00093304
Views:
28
>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.

I got it to work by using a variable reference

osend = CREATEOBJECT("mycontractsletters")

but isn't there a way to use a property to hold reference instead of having
to assign a PUBLIC variable to hod reference? I think I saw this in a thread earlier but I haven't found it.

John.
Previous
Reply
Map
View

Click here to load this message in the networking platform