My new component (TComponent) uses DsgnIntf since I use custom property editors. The problem is when using the component in a custom VCL application – DSGNINTF.DCU not found! One solution is to add a command line switch to a compiler (dont remember any more what is it), but I don’t like that solution. The second solution is a unit segregation. I found this:
http://edn.embarcadero.com/article/27717
The problem is – I don’t understand this article so well.. I don’t know what exactly I need to do in my component unit to separate design-time from runtime code. Could someone please make the simplest example and explain it? I just want to avoid problems with “dsgnintf.dcu not found” when people using my component. Thank you.
EDIT:
I looked the article a bit more and I realize the second unit registers the first one. To avoid dsgnintf.dcu problem I presume the second unit must be in it’s own .pas file?
Usually you create a single unit to register your package in IDE, something like that:
and include this unit into design-only package:
The article you link covers also property editors. All package code not related to IDE should be contained in run-only package: