6
votes

I have a package of custom components that compiles and installs installs with no problems. The source files for the package are in my library path, as is the location of the resulting bpl files. After installing, the package and components correctly appear in the Design packages list. They do not appear in the Tool Palette, however.

However, any time I open a form that contains one of the components, I get a class not found error, and the dfm won't open. The project will compile fine, and I can view all pas files, but the form won't show in the designer.

What am I doing wrong here? How can I get the components to show properly in the form designer?

Here's my registration code for the components:

  RegisterComponents('QuoteSystem', [
    TFnpLabelNumericEdit,
      TPBxCheckBox,
      TPBxCheckBoxSub,
      TPBxComboBoxSub,
      TPBxListBoxSub,
      TPBxRadioItemSub,
      TFnpNumericEdit,
      TQGlobals,
      TPBItem,
      TPBxCheckListBox,
      TPBxCheckListBox,
      TPBxComboBox,
      TPBxDateEdit,
      TPBxDescList,
      TPBxEdit,
      TpbxInteger,
      TPBxLabel,
      TPBxLabeledEdit,
      TPBxLabelNumericEdit,
      TPBxListBox,
      TPBxMemo,
      TPBxNumericEdit,
      TPBxQuoteElement,
      TPBxRadioGroup,
      TPBxRadioItem,
      TPBxRichEdit,
      TPBxSpinEdit,
      TpbxSummaryGlobals,
      TAlignEdit
]);
3
Do you have the dcu files in your searchpath?Toon Krijthe
They're in Delphi's library path...croceldon
Does the program start correctly after compilation? Review the .dfm file in a stand alone text editor for any anomalies.jszpilewski
It starts and runs fine...the components don't even show up in the Tool Palette.croceldon
If the components don't show on the palette then the design time package registration did not go well. It may be related to a different Delphi version settings in some configuration file. And some defines may mess the code very bad if they do not know the Delphi in the version currently being used.jszpilewski

3 Answers

2
votes

The typical mistake for this to happen is writing Register in either the interface section or implementation section in lowercase or any other case than the correct one.

Wrong:

procedure register;

implementation

procedure register;

Correct:

procedure Register;

implementation

procedure Register;
0
votes

You have to register your components like this

RegisterComponents ('Custom', [TMyCustomComp1, TMyCustomComp2]);

otherwise the IDE will not be able to create the components in the form designer.

0
votes

Convince yourself having added the unit which contains the registering code to the contains section in the package file / project source.