Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy a class or method in a class?
Message
From
10/08/1999 17:19:45
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00252087
Message ID:
00252230
Views:
9
>>Hi,
>>
>>I need to copy a class from one class library to another or within the same class library. I would also like to be able to copy individual methods within a class to another class (within the same library). I don't see any convenient ways of doing this with the class browser or project manager. Any ideas?
>>
>>TIA,
>>
>>-JT
>>
>>P.S. Craig B. et al, what the heck does PMFLJ stand for?
>
>Jeff,
>
>May I ask why you want to copy a class? The usual way to get a new class with the same funcitonality of another is to subclass not copy. The need to copy a class definition may be an indication of a design problem that would be better fixed than worked around.

Jim,

Thanks for your response. The reason why I want to copy class/methods within a class has nothing to do with copying the same code to be used in different places. I simply want to create a backup of my class with some of the same methods for development purposes.

I am a strong believer in inheritance and oop and apply these principals whenever possible.

I guess my answer regarding copying methods from one class to another is "it can't be done".

Regards,

-JT
Jeff Trockman, MCP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform