Component Storage Mechanism

I have a problem that seems to lie with the mechanism that Delphi uses to store the representation of components.  I am attempting to use an existing components source as the basis for a new component I wish to develop. Inheritance is not appropriate as I am going to be making substantial
numbers of amendments to the functionality, but the source solves a lot of development issues I would otherwise have.  I have taken these steps as a start point:
1 I set up a new component (with appropriate name changes) inheriting from the parent of the component I wish to copy.
2 copied the source of the component
3 Written a registrtion unit, again copying the source relevant to that I wish to use, and registered the copy.
4. Because of the problems I am having I have checked the (60 page) source line by line and am confident that it is identical to the original.
At this stage the component should be identical to my source (except for name).  The component appears to work correctly in design mode (except for some property editors I have not yet copied).  When running the component
part of it (the tabs in a tabbed notebook) get duplicated.  The problems arise when ReadState is called, and appear to be related to the storage of information as the duplication is reflected in the Object Inspector.  The other characteristic of the copy and the original that differs is that when viewing a form as tezt the original places comparatively little information, while the copy places a great deal of information in the text file (including full details of constituant components which do not written out in the original).

Can anybody provide assistance as to how to tackle identifying and isolating this problem.

Cheers
Chris Walton
cjwal1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mirek071497Commented:
I must know more, but you say so this component is big. Mail the source to me, mayby i can help you.
mirek@izabell.itcomp.tpnet.pl
0
dionysos_swampCommented:
copy the source file, not just the contents:
copy original.pas messedup.pas
then do a search and replace in the file replacing all the Toriginal words with Tmessedup, then check the files that the messedup.pas file uses, it might be one of the sub-components that do some stuff with the Toriginal class, therefore check the used units for refrences to Toriginal and take care of these refrences (by making the new subunits with refrences to Tmessedup) you know that you have succeeded when you can recopmpile the vcl and get it to work like the original...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cjwal1Author Commented:
All references from called classes had already been dealt with as all the called classes were originally contained in one unit.  I have out all the references in these subordinate classes.  I will attempt you suggestion as to copying the files, though I will complete this over the next couple of days.

Chris
0
andrewjbCommented:
Just to point out that the VCL source, if that is what you are using, doesn't exactly reflect the components on the palette!
0
cjwal1Author Commented:
Thanks all sorted as a result of this approach.

Cheers
Chris
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.