Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi 2009: "Class not found" when using component package

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
]);
like image 362
croceldon Avatar asked May 24 '11 12:05

croceldon


1 Answers

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;
like image 164
NGLN Avatar answered Nov 15 '22 05:11

NGLN