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(PalletP age, [TRCKComponent]);
RegisterPropertyEditor(Typ eInfo(TAbo utString), 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?
in this unit is the following code
{ ... }
procedure register;
implementation
procedure register;
begin
ShowMessage('Registering..
RegisterComponents(PalletP
RegisterPropertyEditor(Typ
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?
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...
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ray, don't tell me this is the reason. Case sensitivity? In Delphi?
Ciao, Mike
Ciao, Mike
ASKER
third try...
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...
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.
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.
ASKER