Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying Objects from Class to Class
Message
 
To
17/08/2004 17:10:20
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00933939
Message ID:
00940921
Views:
17
Whew, so busy I have not been back to the thread in ages. Thanks for the response Mike. Your advice makes perfect sense and I'd agree that is definitely the way to do it when you are building from the ground up. Problem is (and I didn't mention this in my hypothetical) someone else did the original programming. So, I'm not fortunate enough to have the opportunity to plan ahead for this stuff. I basically got to work with what they gave me. I knew this was a long shot anyways, but I figured it was worth asking. It wouldn't be bad if I had one set of controls I wanted to copy to 20 new classes. Then I could easily create a new class like you suggested. The problem is that I have 20 different sets of controls that I need to copy to 20 different classes. Oh well, a little hard work never hurts (especially when it's billable <grin>)

Thanks,
Don

>You'd make a customer UI class and drop it on both the customer form and the invoice form.
>
>>Is is it possible to copy objects that are members of a parent class from one screen form class to another?
>>
>>What I have is say a class library called MYBASE.VCX which has my own form, textbox, combo, etc. based on the foxpro base classes. I build a new class library called MYAPP.VCX. I put a form called CUSTOMER in that new library which is based on the form in MYBASE.VCX. I put textbox controls on that form which are based on a control in the MYBASE.VCX class library.
>>
>>Now let's say I want to make a new form in the MYAPP.VCX again based on the base form in the MYBASE.VCX library. We'll call this form INVOICE. I want to copy the company name, street address, city, etc. textboxes from the CUSTOMER form to the INVOICE form so that their appearance looks the same on both forms without having to go through and add each individual text box one at a time.
>>
>>When I attempt to copy the textboxes from CUSTOMER I get the message:
>>
>>Cannot copy objects beacause some are members of a parent class.
>>
>>Is there any way around this?
>>
>>Thanks,
>>Don
Don Knoup
don.knoup@ticomix.com
Ticomix, Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform