The Delphi Bug List

Entry No.
435
IDE
Components are not registered if the "Register" procedure is not spelled in mixed case
1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 4.03 5.0 5.01 6.0 6.01 6.02 Kylix 1.0
AbsentAbsentAbsentAbsentAbsentExistsExistsExistsExistsExistsExistsExistsUnknownUnknownUnknown
Description
Reported by Cary Moore; checked by confirmed by several people on the newsgroups
If you have written a component that you weant to install in the component palette, using the "Register" procedure, this will not work if you spelled "Register" as "register" (or any other way different from "Register").
The 'project' will compile and the package will also be installed, but the component will not become visible in the component palette.

Additional information by Ray Quay:
What is happening is that this register procedure is not called during the install process, which means the registercomponent() procedure is not called to register the component. The IDE is using a case sensitive search through the units procedure table for a procedure called "Register".

User-contributed comments
Anonymous
20 Mar 2001  07:09 PM GMT
This is not a bug. This is documented.
Reinier Sterkenburg
27 Mar 2001  06:31 PM GMT
It is a bug, for two reasons:
1. In Delphi 1, 2 and 3, this behaviour was not there

2. The delphi 5 documentation fails to mention it on most places where it would be appropriate.
Try these:
- From the Help Contents tab, choose, under Create Custom Components, under Introduction to component creation, the topic "Registration overview".
Then jump on that page through the link "Registering components".
The topic does not mention the case sensitivity.
The next two topics: "Declaring the Register procedure" and
"Writing the Register procedure" don't mention it either. I can go on trying links, but I haven't found the specific Help page where the case-sensitivity is explained.
And this information should not be hidden at all; this case-sensitivity is rather odd for OP programmers and therefore should be documented *very* clearly.
- On the Index tab of the online help, choose the item Register. No mention of case-sensitivity. It says "Registration is a simple process ...";
well, I don't have experience with it myself, but I am convinced that someone who declared it as "register", will definitely not find it simple...

IMHO, this item should be considered 'fixed' when either the documentation becomes MUCH clearer about this or the behaviour is restored to normal (not case sensitive) again.
Daniel Grace
24 Aug 2001  11:50 AM GMT
I tried this in Delphi 6 Build 6.163, it has not been fixed. I tried "register" instead of "Register" in both places in the unit. My component did not appear until I changed the text to "Register." IMO this is confusing especially when the IDE colours both "register" and "Register" as keywords, so there is no indication that anything is wrong. It is worth noting that only using "Register" at the top of the unit and "register" on the procedure itself works OK, that in IMO is strange.
Latest update of this entry: 2001-08-28

Post a comment on this bug


Index page
Delphi Bug List home page
The Delphi Bug Lists are presently maintained by Jordan Russell, who has taken over this task from Reinier Sterkenburg since August 2000.
All feedback is appreciated. See also the feedback section of the Delphi Bug List home page.