6

When developing a new component in Delphi, I run into this inefficiency. Every time I make incremental changes to the source code (for example, a bug fix), I build the new component and install it on the Component Palette. This is OK. In another instance of the IDE, I have a project opened that is using this component. It is a visual component on one of my forms. To apply the new changes, restart of this second instance is required — closing and reopening of form or project is not enough. Can this process be optimized?

Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
truthseeker
  • 1,220
  • 4
  • 25
  • 58

1 Answers1

3

If you want to reload the design-time package without killing the IDE you can:

  1. Open the Install Packages dialog.
  2. Uncheck the package and the re-check it.

Edited to remove unnecessary steps.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Steps 1 and 4 are not neccessary. – truthseeker Apr 13 '12 at 11:16
  • Sometimes it happens i cant build component project because of fatal error: Could not open (program is still running?). This can be avoided by reordering operations: first unchecking the package, then building and installing component and re-checking the component again. – truthseeker Apr 13 '12 at 11:23
  • 1
    I think if you want to run two IDE instances its always going to require more work. Delphi handles the reload in the current IDE instance but doesn't tell other instances to reload its packages. If you can work in a single IDE instance, and just use a Project Group, instead of switching IDE instances, you'll find this gets easier. – Warren P Apr 13 '12 at 13:51
  • Warren is right. Unless you're debugging the component's design-time behavior, you shouldn't need a second IDE instance. – Rob Kennedy Apr 13 '12 at 15:50
  • Why doesn't Delphi give you a option for it to automatically reload certain packages? – Greg T Nov 18 '22 at 12:23
  • @GregT Perhaps because the developers didn't think to do it, or decided that it wouldn't be sufficiently beneficial, or because there are technical reasons why it would be hard to implement. Who knows? – David Heffernan Nov 18 '22 at 12:31
  • I've added steps to repeat this Access Violation here: https://quality.embarcadero.com/browse/RSP-40029 – Greg T Nov 18 '22 at 13:29
  • @Greg The question, and my answer, don't appear to discuss any access violation. Did you post in the wrong topic by mistake? – David Heffernan Nov 18 '22 at 14:03
  • Oh... The Access Violation is similar to my problem. I linked https://en.delphipraxis.net/topic/7842-replicable-w-source-why-do-i-always-get-access-violation-every-time-i-rebuild-any-component-current-solution-is-to-restart-delphi-why in the quality bug report which also has a link to this stack overflow link for a possible answer. – Greg T Nov 19 '22 at 00:32
  • @Greg OK, but this question has nothing about ab access violation. I'm confused by your comments. – David Heffernan Nov 19 '22 at 08:21
  • Ok,,, yeah.. I think this was for another stackoverflow topic and I was working on my project in overtime and wasn't thinking straight. – Greg T Nov 19 '22 at 11:25