-1

I'm trying to add a new property (Images: TImageList) to the TMS Control "TAdvSmoothDock" but the property doesn't appear in the Object Inspector

I defined it under "Published" as following :

Published
  property Images: TImageList read GetImages write SetImages;

I can compile it but the property doesn't appear in the Object Inspector. it does appear in the delphi IDE when using the control in the code:

like :

AdvSmoothDock1.Images := ImageList1;

currently I'm using Delphi XE2 VCL.

Regards.

user1512094
  • 611
  • 2
  • 10
  • 23
  • Yes it is installed...I told you I can use it but the new property doesn't appear...I tried to uninstall it and build, compile, install it...aslo I tried to delete the DCUs, BPL and build new ones and install it. – user1512094 Jul 12 '12 at 10:04

1 Answers1

4

You need to rebuild the TMS packages that contain the component, not just change the source code.

The Object Inspector doesn't use the code source to figure out what to display. It uses RTTI (run-time type information) it gets from the compiled version in the runtime package that contains the component (or the designtime package if there is no runtime package available.

Figure out what package the TMS component is in, open that package's source in the IDE (the .dproj file for the package), and do a build of that package. Make sure it's seeing your version of the source instead of the normal TMS version, so your changes are used.

(Of course, the proper way to do this would be to create your own descendant of the TAdvSmoothDock, add the property, put it into your own package that uses the TMS one, and never touch the TMS source code.)

Ken White
  • 123,280
  • 14
  • 225
  • 444
  • I did it...I tried to rebuild the TMS Packages but no luck...i checked the path and everything and still the same! I know how does the object inspector figure out what to display also I tried the proper way but I have my concerns and that's why I'm modifying the TMS base code. but regardless the proper way recompiling and rebuilding the package would let re-new the RTTI which will let the obejct inspector to read the new properties but in my case it doesn't work... – user1512094 Jul 12 '12 at 11:06
  • 1
    @user1512094 Sorry for being bold, but your concerns are ungrounded since you have too little experience. Stick to the proper way and get thát working. – NGLN Jul 12 '12 at 11:09
  • 2
    Then you're not rebuilding the proper package, or when the package is being rebuilt it's picking up the original source file. Those are the only two possibilities (and I've done this a few hundred times, so I'm pretty sure about that fact). – Ken White Jul 12 '12 at 11:10
  • 2
    Sorry, but my answer is the correct answer. If it's not working for you, you need to figure out how you're not doing it correctly. – Ken White Jul 12 '12 at 11:19
  • @user1512094, if I understand you correctly, you modify the original TMS source code ? Don't do this, since TMS is pushing updates to their software quite frequently, and if you install it, your changes are lost. Better create your own package and derive your modified version from Tadvsmoothdock – iamjoosy Jul 12 '12 at 11:24
  • 1
    @iamjoosy: That's exactly what I said in the last paragraph of my answer, and what NGLN said also in his comment. – Ken White Jul 12 '12 at 11:29
  • @user1512094 How did the answer not help? You simply need to follow the instructions in the final paragraph of the answer. – David Heffernan Jul 12 '12 at 12:04
  • @KenWhite, sorry my fault. Sometimes it would help to read an answer before commenting on it ;-) – iamjoosy Jul 12 '12 at 12:34