> If so I would appreciate if someone could give me some (newbie
> level) instructions on how to go about replacing each instance of
> the TNumericEdit and keeping the original component events code
> intact. Is this possible?

Here's what I'd do:

0. Back up everything.
1. Find out the name of the unit TNumericEdit was in (let's pretend it was
numedit.pas)
2. Get a replacement class from somewhere (let's pretend it's called
TNumberEdit, in numberedit.pas)
3. Rename numberedit.pas to numedit.pas
4. Edit (the new) numedit.pas, and search and replace TNumberEdit with
TNumericEdit.
5. Recompile (the new) numedit.pas, and add it to your library.
6. If you're lucky, your projects should load.
7. If you're unlucky, they'll complain about missing properties or events.
You might be able to ignore the warnings (and lose the properties), or you
might want to edit (the new) TNumericEdit class such that it now has the
missing properties and events.

Good luck!

Cheers,
Kerry Sainsbury
Inprise/Borland New Zealand

-- Win2k: "It's not so much that it's only 65,000 bugs, it's just that they
stopped at 65,535 to prevent an overflow


> This is a disaster recovery question!
>
> My production machine has died.  My backup covered my project
> files OK but (as Murphy would have it) there is a  one-off
> component (TNumericEdit) that was provided to me by a contract
> programmer (and of which there are maybe 50 instances of in the
> project), which escaped my backup.
>
> When I try to load the project on my second machine and open the
> MainUnit I get a message saying that the class TNumericEdit is
> not found and that if I continue the the components are likely to
> be deleted from the project.
>
> Assuming that I cannot track down another copy of this component,
> I would like to replace it globally with.one from the DSP.  I
> anticipate that I will just then have to merely recode the
> appropriate events of the new components.
>
> If so I would appreciate if someone could give me some (newbie
> level) instructions on how to go about replacing each instance of
> the TNumericEdit and keeping the original component events code
> intact. Is this possible?
>
> TIA
>
> Mark
>
> (See attached file: mhoward.vcf)

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to