Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you copy a component
Message
 
 
À
30/11/1999 14:40:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00296896
Message ID:
00297068
Vues:
38
Erik,

Ok, let's me describe my problem (honestly, I already did this manually, but just wondering, if it would be helpful in the future)

My coleague introduced several classes in his app. I was assigned to make some changes (add more controls on the pages). He introduced btcc_multilist, btcc_valrange as two base classes and several subclasses of them. Then I defined 3 new classes: btcc_text, btcc_check and btcc_options. All these new classes should have btc_whereexp, btc_statesave methods and btcmaparray[4] property. So, I wanted to copy these methods with their descriptions into my new classes and just modified the code. Unfortunately, there no tools for this, so I used copy and paste technique lots of times.

What's why I ask my question.

Right now I think that I could copy his classes under another name (since all classes based on a container), and then modified them. But in the time I was creating them I didn't think about it.

>Yeah, but I don't suggest going this unless you have a LOT of methods and properties to copy. Is it possible you are not approaching your class design properly? I have never needed to copy a lot of methods from class to class like this. Sounds like VB inheritance.
>
>
>>Erik,
>>
>>Do you mean that I should manipulate directly with vcx file as a table? And may be write a simple routine to do that?
>>
>>
>>
>>>There's no native support for this. You would need to hack the vcx to get this.
>>>
>>>>Hi everyone,
>>>>
>>>> I want to ask: How can I copy one method with it's description from the one class to another class of the same class library? And properties?
>>>>
>>>>
>>>>
>>>>
>>>>>>>>Do you mean a class from one library to another?
>>>>>>>exactly
>>>>>>>
>>>>>>
>>>>>>1. Open the source class library in one instance of the Class Browser,
>>>>>>2. Open the destination library in another instance
>>>>>>3. select the class in the first instance
>>>>>>4. Hold CTRL while dragging the icon in the upper left corner of the browser to the new library.
>>>>>
>>>>>YES, I did it with proj mgr and it worked. thank you.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform