Search code examples
delphiteechartdelphi-10.2-tokyo

TeeChart package introducing Invalid Typecast in Delphi when GetIt Package Manager is launched


We're using TeeChart Pro v2012.07.121105 32bit VCL and just upgraded to Delphi Tokyo 10.2.3. We maintain our own packages and haven't upgraded TeeChart in a while, so I'm hoping someone here can give me some advice.

When our TeeChart package is enabled in the Delphi IDE, launching GetIt Package Manager from the Tools menu causes an Invalid Typecast exception to appear before the GetIt dialog appears. Once the error dialog is closed, GetIt does appear but contains no packages.

If I disable our TeeChart package, the Invalid Typecast no longer occurs and GetIt launches as expected. With all of our packages disabled, enabling TeeChart is the only one that introduces the Invalid Typecast.

Does anyone know of changes or fixes in TeeChart since 2012 that are related to the integration with the Delphi IDE integration?

Thanks


Solution

  • The conflict turned out to be the TGifImage, defined in our TeeChart source in Sources\GIFImage.pas. That class is not compatible with the TGifImage class used by the IDE, yet the TeeChart class was being used by an "as" cast in the GetIt source code.

    Renaming the TGifImage class used by TeeChart solved the issue.