?
Solved

Register Components in Delphi 5

Posted on 1999-12-15
7
Medium Priority
?
587 Views
Last Modified: 2011-09-20
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?
0
Comment
Question by:topkapi
7 Comments
 

Author Comment

by:topkapi
ID: 2283980
Edited text of question.
0
 
LVL 3

Expert Comment

by:markshiffer
ID: 2284133
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...
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 200 total points
ID: 2284730
Change this line (two ocurrances)

procedure register;

to:

procedure Register;

I kid you not!

Cheers,

Raymond.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
LVL 10

Expert Comment

by:Lischke
ID: 2286992
Ray, don't tell me this is the reason. Case sensitivity? In Delphi?

Ciao, Mike
0
 

Author Comment

by:topkapi
ID: 2287198
third try...
0
 

Author Comment

by:topkapi
ID: 2287202
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...

0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2287979
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.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses
Course of the Month7 days, 8 hours left to enroll

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question