Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I call a METHOD from a procedure ?
Message
From
15/04/1998 15:34:42
 
 
To
15/04/1998 15:28:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00092218
Message ID:
00092250
Views:
25
>>>>>>>>How do I call a METHOD from a procedure ?
>>>>>>>
>>>>>>>It entirely depends on way you store form references in your app. As long as you can retrieve the reference you use it to call form method:
>>>>>>>oApp.oFrmCopy.Copyeverything()
>>>>>>---Hi Ed
>>>>>>I have a class called HELPDESK_MAINTFORM. In this class, I have a
>>>>>>METHOD called CLEARQUERY. How would I run the CLEARQUERY from a procedure?
>>>>>>example...HELPDESK_MAINTFORM.CLEARQUERY()
>>>>>
>>>>>It doesn't matter what class you have. What is really matter here is how you instanciate the object from this class in your application: the object (not class) reference must be used.
>>>>---
>>>>Can you give me a code sample of how to instanciate the object please.
>>>
>>>oApp.frmCopy=createobject("frmCopyclass")
>>>and now you can call a method:
>>>oApp.frmCopy.Custommethod
>>---
>>OH - I see -
>>you need to createobject() when you want to call a method
>>in a class? is that right?
>>sample - If I have a class called myclass and in this class
>>you have a method called my_method. If I want to call my_method,
>>I need to :
>>o_myobj = createobject("myclass") then you can...
>>o_myojy.my_method()
>
>Ok.
---
thanks Ed - you have helped me understand things better. now I
can finally put calling methods (functions) from classes behind me.
:)))))))))))))))))))))))))))))))))))))))))))))))
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform