Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy classes from other classlib
Message
From
05/12/2001 03:27:21
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00589229
Message ID:
00589675
Views:
26
Hi !

Yes that's the trick I was never thinking so far.
Thanks this will save me a lot of Ctrl-c and Ctrl-v.

>Hi!
>
>Ok, now I understand.
>Just copy that class from classlib1 to classlib 3. Then move classlib 2 out of reach for VFP development environment (for example, create new folder and move it there). Now open class for editing. VFP will ask "where is that class from classlib2?" or something like that and will allow you to open the correct file and select the correct class. After mapping all classes, change something (for example, change some property than revert that change), save that form class and close - this should fix all paths and mapping to classlib.
>
>Just try it na dlet me know if that helped.
>
>>I think I explain my problem bad.
>>I have two classLib that are almost the same?
>>Classlib1.vcx
>> Myform (based on classlib2.vcx)
>> Mybutton
>> Mybussinesclass
>>
>>ClassLib3.vcx
>> MyButton
>> Mybussinesclass
>>
>>I would like to copy Myform to Classlib3 and this class should be based on classlib4.vcx
>>I can do this manualy by copy all the records from the table classlib1 to classlib3 and then replacing all the fields that have a reference to classlib2 with classlib4.
>>
>>
>>>Methods and props from WHERE?
>>>
>>>When you redefine the class, properties and methods added to that class are not lost - you just change the base class. Well, if you meant code from base class - of course you will not have it because that base class is no longer a parent.
>>>
>>>Just try it on a simple test after backup of your class.
>>>
>>>BTW, you CANNOT create a class based on two other classes to mix properties and methods. Do do that, use only container with object in it or something like that.
>>>
>>>>Hi ?
>>>>Ok but then the I'm loosing the methods and prop. ?
>>>>I want a new class with the same additional methods and properties but based on another class ?
>>>>
>>>>>Hi!
>>>>>
>>>>>this is also simple:
>>>>>
>>>>>Open the library in the class browser, right click on the class and select "Redefine..." from the shortcut menu.
>>>>>
>>>>>>>Hi!
>>>>>>>
>>>>>>>- Just in the project manager you can drag and drop it.
>>>>>>>- There is a command for that
>>>>>>>- you can open 2 instances of class browser, open 2 libraries in each and drag&drop.
>>>>>>>
>>>>>>>HTH.
>>>>>>>
>>>>>>>>Hi all,
>>>>>>>>
>>>>>>>>is there a trick to copy a class from a classlib to another classlib ??
>>>>>>>>
>>>>>>>>ex.
>>>>>>>>
>>>>>>>> classlib.vcx copy anotherclasslib.vcx
>>>>>>>> -myform -------> -sameformAsmyform
>>>>>>
>>>>>>hanks for the fast response
>>>>>>
>>>>>>I will try that,
>>>>>>the thing I'm trying to do is changing the parentclass of a class.
Previous
Reply
Map
View

Click here to load this message in the networking platform