So far, to make things easy, I have always created components that are Desingtime and Runtime and I've used the component wizard. It works fine but I see that separating runtime and designtime is better.
The Frazioni.bpl
is a Runtine only package and it has in Contains a pas file called uFraction.pas
. It is an utility for fractions and it has inside a class like this:
type
TFraction = class(TComponent)
end;
dclFrazioni instead is Designtime only. I am reading More Coding in Delphi and nick says:
First thing to do for a design-time package is to set its Requires clause
Ok but how do I do this? I understand that I have to link the runtime and the Designtime but how? I have built the Frazioni.bpl but when I right click dclFrazioni I have to add a reference but I don't know how.
The designtime only package is just going to have the Register
procedure. So basically:
- Frazioni.bpl = runtime with one (or more) pas file containing the classes I need, they inherit from TComponent.
- dclFrazioni.bpl = designtime with a pas file containing the Register procedure
I am lost because I don't know how to link them.
RegisterComponents()
doesn't count, as it is implemented in a runtime package). – Remy Lebeau