[Lazarus] can't take the address of constant expressions

Roberto Padovani padovani.r at gmail.com
Fri Feb 5 17:14:30 CET 2010


2010/2/5 Flávio Etrusco <flavio.etrusco at gmail.com>:
> That's it.
> That code used to compile with FPC 2.2, but doesn't with 2.4. See:
> http://wiki.freepascal.org/User_Changes_2.4.0#Treating_direct-mapped_properties_as_regular_fields
> In this case, simply change the code to "Inc(FInputPos, UTF8Length(s));".
>
> Best regards,
> Flávio
>

In this case, I can't understand why the error is gine in plotpanel
package for the following line:

    FOnXMarksWrite(self,X,xStr,ACanvas.Font,evtHandled);

which is inside the implementation of

    procedure TPlotPanel.WriteXaxisValues(ACanvas:TCanvas);
    var
       X : Extended;
       XStr : string;
       evtHandled : Boolean;
    ...

isn't it right to read the ACanvas.Font property?
In fact, I can't change it to the FFont private variable, because they
belong to different classes.

Roberto




More information about the Lazarus mailing list