iOS compilation fails with new 2012 version

TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
Post Reply
X-Ray
Newbie
Newbie
Posts: 49
Joined: Fri Jan 27, 2012 12:00 am

iOS compilation fails with new 2012 version

Post by X-Ray » Fri Mar 30, 2012 12:21 pm

Hello,

I just installed TChart 2012 Pro and then copied the new FMI folder content to
the the Developer\Embaracadero\fmi folder on my MAC.
When I try to start an iOS program in XCode that previously compiled (FPC 2.6.0) and worked then
I get an compiler error message:

FMXTee_Series_Shape.pas (485,24) Error: can't determine which overloaded function to call

How can I solve this?

best regards,

X-ray

X-Ray
Newbie
Newbie
Posts: 49
Joined: Fri Jan 27, 2012 12:00 am

Re: iOS compilation fails with new 2012 version

Post by X-Ray » Mon Apr 02, 2012 6:23 am

Hello,

to get this compiled I replaced:

xysPixels: result:=TeeRect( Trunc(X0), Trunc(Y0), Trunc(X1), Trunc(Y1) );
xysAxis : result:=TeeRect( CalcXPos(0),CalcYPos(0),CalcXPos(1),CalcYPos(1) );

by

xysPixels: result:=TRectF.Create( Trunc(X0), Trunc(Y0), Trunc(X1), Trunc(Y1) );
xysAxis : result:=TRectF.Create( CalcXPos(0),CalcYPos(0),CalcXPos(1),CalcYPos(1) );

best regards,

X-Ray

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: iOS compilation fails with new 2012 version

Post by Yeray » Tue Apr 03, 2012 10:30 am

Hi X-Ray,

I'm not sure it should be necessary.
I see in TeCanvas.pas:

Code: Select all

{$IFDEF FMX}
type
  TRect=TRectF;
{$ENDIF}
That I think it should do the trick. Could you please check if you have TeCanvas i the uses clause?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

X-Ray
Newbie
Newbie
Posts: 49
Joined: Fri Jan 27, 2012 12:00 am

Re: iOS compilation fails with new 2012 version

Post by X-Ray » Tue Apr 03, 2012 1:00 pm

Hi Yeray,

I didn't change any TChart code I simply copied the code from the FMI folder to my MAC.
So it should fail on your end too!
And yes TeCanvas and FMXTee_Canvas is in the uses clause.

best regards,

X-Ray

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: iOS compilation fails with new 2012 version

Post by Yeray » Thu Apr 05, 2012 8:13 am

Hi,

I haven't tried it in a Mac but you could try the following to force freepascal to use the TeeRect overload that takes a single as first parameter:

Code: Select all

xysPixels: result:=TeeRect( {$IFDEF FPC}1.0*{$ENDIF} Trunc(X0), Trunc(Y0), Trunc(X1), Trunc(Y1) );
xysAxis : result:=TeeRect( {$IFDEF FPC}1.0*{$ENDIF} CalcXPos(0),CalcYPos(0),CalcXPos(1),CalcYPos(1) );
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply