Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying Component Code

Status
Not open for further replies.

LocalBoy44

Programmer
Jan 20, 2006
5
CA
Delphi 6 Enterprise (Update Pack2)

Hi All,
Has anyone ever modified the Delphi Source Code?

I just did but how do you get Delphi to use that updated code?

Let me explain, there's a documented bug in the Decision Cube with a recommended fix on how to correct the problem by making a small change to mxstore.pas in the Decision Cube source directory. I made the change; however, I can't get Delphi to use the updated component. I've tried the usual compile options (build, build All etc). I've tried re-adding the component to the form and re-compiling. Nothing seems to work - Delphi still uses the old code.

I've looked at uninstalling the component from the palette but I don't want to mess with the IDE unless I'm absolutely sure that's what I have to do.

Does anyone have any ideas?
 
Are you compiling the package or an application which uses the component?

Compiling the app your are recompiling the code but not rebuliding/reinstalling the patched package.

And some packages can't be rebuilt/reinstalled, as Borland fears people distributing altered BPLs (at least that is what they say).

buho (A).

 
Thank you for your comments.

I tried renaming the dcl file in the lib directory, but it produced an error when the code wasn't found. I added the updated pas file to the lib directory which cured the error but Delphi simply recreated the dcl file and the new code in the pas file isn't recognized.

Borland originally promoted Delphi on the premise that you could change the source code of their components. I'm surprised that they now block you from doing it.

Any suggestions?
 
What the dcl name is? Google to be sure it is a no recompilable one.

If it is no recompilable: copy the sources to another directory; change the DPK name, change the PAS unit name (or names, may be you need to copy more than one, depending where you are issuing the patch), change the component name (type). Create a new package (BPL) and install it.

Now you have two components: the original one and your one. At your discretion: let the other hanging around or remove it from the palette.

buho (A).

 
Thank you for your response, buho.

I was considering renaming and re-installing the component because the file (mxstore.pas) doesn't appear to be recompilable - at least Delphi doesn't let me recompile while I have the file open.
 
Apparently the package is recompilable, but some people in the net is complaining about a missing source file in D6 and D7.

buho (A).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top