6

I am writing a component that requires the use of both the units

DesignIntf, DesignEditors

When i build my package, i get the error

File not found: 'DockForm.dcu'

When I add "designide.dcp" to the "requires" section of the package, it builds and compiles just fine.

HOWEVER, when i add the component to a new project (in design time, it works. I can change all the properties, etc......BUT, it does NOT work in runtime. When i run the application with the component on the main form, i once again get the " "File not found: 'DockForm.dcu'" error

please help

thanks

RRUZ
  • 134,889
  • 20
  • 356
  • 483
IElite
  • 1,818
  • 9
  • 39
  • 64

1 Answers1

6

You're not allowed to use any of the Design* units in your runtime code. It's for use at designtime in the IDE only, and can't be linked in to your own application. That's why the .DCUs aren't found; they're not provided, and their functionality is provided in the designtime only packages in the IDE itself.

Ken White
  • 123,280
  • 14
  • 225
  • 444
  • So how do I get by this? I clearly have a component I need to use at runtime, but properties that need to be changed at design time ( property editors ) – IElite Nov 26 '10 at 19:05
  • So, i am using the following property editor in my component TFileNameProperty = class(TStringProperty) and because of that, i need to include the following units "DesignIntf, DesignEditors" to my uses clause. In order for it to compile/build correctly, it wants me to add the "designide.dcp" to the requirements section of my package. Clearly i have something haywire in my Runtime, versus Design time....what i need help in fixing this.....thank you – IElite Nov 26 '10 at 22:44
  • 1
    ahhh, i did some research, and see that you have to segregate the design-time code from runtime code. http://edn.embarcadero.com/article/27717 – IElite Nov 26 '10 at 22:59