Page 1 of 1

Incompatible types TTeeFunctionClass and TSmoothingFunction

Posted: Fri Aug 21, 2020 6:44 am
by 16587311
Hello

I have just set up a new machine with Delphi XE5 and XE10.4 Sydney. I have applied all patches.
I have installed TeeChartVCLFMXSOURCE-2020.30.exe and compiled everything for both versions.
XE5 is running fine, but when compiling a copy of the same code in XE10.4 Sydney I get the error:

VCLTee.TeeSpline.pas(634): E2010 Incompatiple types 'TTeeFunctionClass' and class of 'TSmoothingFunction'

Code: Select all

initialization
  RegisterTeeFunction( TSmoothingFunction, @TeeMsg_FunctionSmooth,   //<< This line highlighted
                                           @
     {$IFDEF TEELITE}TeeMsg_GalleryStandard{$ELSE}TeeMsg_GalleryExtended{$ENDIF});
finalization
  UnRegisterTeeFunctions([TSmoothingFunction]);
end.
Any ideas please? I have added FMXTee;VCLTee to the Unit Scope names.

Thanks
Nick

Re: Incompatible types TTeeFunctionClass and TSmoothingFunction

Posted: Fri Aug 21, 2020 8:48 am
by 16587311
I've found the answer. I had just copied the project sources from the XE5 folder to the XE10 folder.
I needed to then delete the XE10 .dproj files as they still point to the XE5 folders/components.
Might be worth keeping this as others may do the same.

Re: Incompatible types TTeeFunctionClass and TSmoothingFunction

Posted: Mon Aug 24, 2020 1:48 pm
by yeray
I'm glad to hear you found how to solve it.
Thanks for sharing.

Re: Incompatible types TTeeFunctionClass and TSmoothingFunction

Posted: Wed Jun 09, 2021 2:09 pm
by 16589147
I ran into a similar problem (Rad Studio 10.4.2 with patches as of today's date, and TeeChart Pro v2021.31 with Source)

The OP's solution didn't work for me (i.e. I tried deleting the .dproj file to create a new one).

It seems to me that what is happening is that the (VCL) project was somehow ending up attempting to use the FMX version of the source TeeSpline.pas for some reason.

To work around it, I changed the order in which the Unit Scope Names are listed in Tools/Options.

Originally, I was doing this:
Tools/Options, Language, Delphi Options, Library, Unit scope names
Paste this into the combo: FMXTee;VCLTee

Everything started working when I did this instead:
Tools/Options, Language, Delphi Options, Library, Unit scope names
Paste this into the combo: VCLTee;FMXTee

Re: Incompatible types TTeeFunctionClass and TSmoothingFunction

Posted: Wed Jun 30, 2021 10:10 am
by Marc
Thanks for the feedback!

Regards,
Marc Meuman