Search code examples
delphicomponentsdelphi-2009custom-component

Delphi custom components, using in project when tpropertyeditor is involved


i have a problem with running my project built in Delphi CodeGear containing my own components. They (the components) use propertyeditors, so I use designide.dcp, and this compiles well and the components appear on the toolbox. But, when I use them in a new project, i can't start it. It says " 'dcc' exited with code 1" ?! I also included the package in the project in runtime packages because it didn't compile otherwise. Help, anyone, please


Solution

  • You probably are compiling the TPropertyEditor into a package that is marked runtime only.

    The best solution is to create two packages, one that contains only the component code and that is marked as a runtime package, and the other that is marked as design-time, requires your previous runtime, and contains the TPropertyEditor.

    Short of that, you can compile a single package but mark the package both runtime and design-time.

    For a simple example of how it is laid out, see the article here:

    http://blogs.embarcadero.com/nickhodges/2010/01/06/39345

    and the code it refernces, here:

    http://sourceforge.net/projects/tsmiley/