views:

552

answers:

2

I have a component package that I maintain, TComPort, a sourceforge project. I recently decided to try to build the C++Builder 2010 version of the packages. Those were built and installed. Then I cleaned my system (all bpl and dcp traces of these are gone!).

Now I have the odd situation where I build the runtime, and build and install a designtime package for Delphi 2010 (with the d14 package suffix), and the component designtime package shows up and is checked, when I click Components -> Install Packages, and also in Project Options, the package shows up. In either place, clicking the COmponents button shows that those components are there in that package.

However, the components inside the package are not in the Tool Palette. There has been no real change in the source code of these components. And I have no idea why Delphi 2010 is acting this way, or why it tells me when I installed my designtime package, that the component package installed correctly, but then, no components will show up.

EDIT: (Workaround: Change 'Page' string parameter in call to RegisterComponents, and this problem is worked around. However, it's frickin' annoying, and I can't figure out how to clean this up)

And here's the killer. When I open a DFM that contains that component, it shows up too. It's only the Tool Palette that is holding back on me. Yes, I reset the component palette. I also decided to summon up the ghost of the delphi 7 component palette (right click at the top of the screen and click components to get the old classic component palette). ANd it ain't there neither.

I suspect this might be a nasty bug in Delphi 2010. I'm hoping someone has seen something like this. It's killing me, I tell you, killing me.

EDIT: I have cleaned up the registry key HKEY_CURRENT_USER\Software\CodeGear\BDS\7.0\Package Cache[my package names here] and no change either

EDIT: I changed RegisterComponents( 'foo', [TMyComponent1,....] ) to RegisterComponents( 'bar', ... ) and suddenly they are back. Where is Delphi 2010 storing the "I hate Category Foo"? This is bad.

+1  A: 

Try right-clicking on the Tool Palette (in the area to the right of the search edit and the mouse pointer are), and choosing "Unhide Button". If the category has been hidden (or all items in it were), you should be able to individually unhide them, which should make the group visible again.

(I just tested this by removing the entire Win 3.1 category, which I never use; I can then use the above steps to re-display it by unhiding one of the buttons it contained like TOutline.)

Ken White
I can hide and show things like this too. Good to know. But it doesn't sort this issue out.
Warren P
Ah, well. Now you know why I said "Try". :-)
Ken White
+2  A: 

If you installed the component, and then customized the Tool Palette to either put the component on some other page or remove the component from all pages, then the IDE will remember so that unloading and reloading the package will not clobber your customizations. The IDE evidently keeps that setting by tracking the component name with its original registered page. When you change the page-registration name, the saved setting gets cleared.

If that's the case, then you manually removed the component from the palette. To get it back on the palette without changing the registration code, manually re-add it to the palette by reversing whatever process you used to remove it.

Rob Kennedy
I didn't actually consciously do anything to remove it. I suspect that something happened when I attempted to register, and then later, deleted, a C++Builder component with the same palette 'Page' name.
Warren P
Actually, there is a fix. If I change the component Reg page name, then I manually drag that component into a new category, it stays in the new category, not in the "I don't know how to unhide it" original Page/category, and when I then move it BACK to a new category with that name that was previously "not working", now it works.
Warren P
Sorry, you've completely lost me. But if you have a solution, that's great.
Rob Kennedy
I just frobbed around with dragging the component icon (after changing its page name in code) to a different Page, then back to the original page. A useful trick.
Warren P
And I learned about the Palette Categories Filter in Delphi 2010 today, which I must say, is LOVELY. Thank you Mark for pointing me there.
Warren P