Link to home
Start Free TrialLog in
Avatar of topkapi
topkapi

asked on

Register Components in Delphi 5

i have a newly created package, wich contains 1 unit.

in this unit is the following code

{ ... }

procedure register;

implementation

procedure register;
begin
  ShowMessage('Registering...');
  RegisterComponents(PalletPage, [TRCKComponent]);
  RegisterPropertyEditor(TypeInfo(TAboutString), TRCKComponent, 'About', TAboutProperty);
end;

{ ... }


i compile the package, then i install the package. (no errors or warnings)

Delphi says 'Package installed' ...

but it never calls the register procedure, so the component never is registered.

what am i doing wrong?
Avatar of topkapi
topkapi

ASKER

Edited text of question.
Your register procedure appears correct, but your saying that it never calls it?

Does it say anything in addition to Package Installed, like "The following components have been registered : TRCKComponent."? (probably not)

What is PalletPage? Usually you stick a string directly in there such as 'RCK'
or something....

Guessing here, if you send me the code I will see if I could install it here...
ASKER CERTIFIED SOLUTION
Avatar of rwilson032697
rwilson032697

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ray, don't tell me this is the reason. Case sensitivity? In Delphi?

Ciao, Mike
Avatar of topkapi

ASKER

third try...
Avatar of topkapi

ASKER

i had to accept your answer three times before discovering i was using the wrong button...

Raymond : it does work the way you showed here. thanks

indeed delphi seems to have become case-sensitive on this matter...

I got bitten by this a while back and only tried the capitalisation as a last resort.

I think the reason is that the Register function in a package is just a DLL call (of sorts), which are case sensitive in Win32.

Not a good excuse I know!

Cheers,

Raymond.