Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I call a METHOD from a procedure ?
Message
From
16/04/1998 10:08:47
 
 
To
16/04/1998 02:55:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00092218
Message ID:
00092500
Views:
32
>>>>>>>>>>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.
>>:)))))))))))))))))))))))))))))))))))))))))))))))
>Hi Robert,
>You already have quite detailed answers, but what I feel that "clearquery" method is a general purpose method not scoped to one form. If so I would suggest to create a custom class and add clearquery method to it. You could then drop your new custom class on to your forms and call :
>
>thisform.myCustomProcsClass1.ClearQuery()
>
>Cetin
--- Hi Cetin
thanks for the information. :))))
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Reply
Map
View

Click here to load this message in the networking platform