0

I have taken Controls.pas and copied it to Control1.pas and done the same with the files its dependant on, so it complies. I found some minor errors to repair and I added one procedure, in TWinControl, Protected, marked it virtual. Compiled it and then renamed Control1 to Controls and the dependant files in the DCU back to original (so not changing the file size). This added procedure, through its name should have no effect on the rest of Delphi that depends on it. I replaced of the original Lib\Controls.DCU and my new procedure is not seen or available in the IDE. I guess I have to get this in a *.BPL file somewhere but do not know how or were. Am I correct so far to put my update in like this.

17
  • 7
    You have modified code that so many other packages are dependant on. Without being able to rebuild all those other packages you are bound to run into issues. Unfortunately it seems a futile exercise Feb 5, 2016 at 8:00
  • 1
    Why? What issue were you thinking to solve?
    – Jan Doggen
    Feb 5, 2016 at 8:57
  • 2
    You have recompile the entire VCL since you've changed the interface. You'd normally try to avoid doing so. Feb 5, 2016 at 9:06
  • 2
    Am I correct so far: No. You've done exactly the wrong thing, which is to modify parts of the base VCL that does not belong to you, and then expect it to have no effect on the rest of the VCL (that also does not belong to you). You can't alter the interface of a unit without every single unit that uses it needing to be recompiled, and that would include every runtime package that's part of the standard VCL. IOW, you've borked everything unless you put things back like they were. There is undoubtedly a better solution than the one you've chosen, but you've not provided info to tell how.
    – Ken White
    Feb 5, 2016 at 13:29
  • 1
    Access the private members with a class helper, or RTTI. You aren't going about this the right way. You certainly don't understand linking process enough to get the details right. You are asking the wrong questions. For the record you aren't allowed to distribute RTL/VCL/FMX standard libraries in your packages. Feb 6, 2016 at 8:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.