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

Flávio Etrusco flavio.etrusco at gmail.com
Fri Feb 5 19:13:32 CET 2010


So there you go. The parameter is passed as 'var', which implies
knowing the variable address. I doubt there's a valid reason for this,
so the fix would be to remove the 'var' modifier.

[]s

On Fri, Feb 5, 2010 at 2:32 PM, Roberto Padovani <padovani.r at gmail.com> wrote:
> 2010/2/5 Flávio Etrusco <flavio.etrusco at gmail.com>:
>>>
>>> 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
>>>
>>
>> What's the signature of FOnXMarksWrite method/handler?
>>
>> -Flávio
>
>
> private
>    FOnXMarksWrite: TWriteAxisEvt;  // X Axis draw event
>    FOnYMarksWrite: TWriteAxisEvt;  // Y Axis draw event
>
> which refers to:
>
> TWriteAxisEvt = procedure(Sender: TCustomPanel; Value:extended;var
> AxisText:String; var AxisFont:TFont; var EventHandled:boolean) of
> object;
>
> bye,
>
> Roberto
>
>
>
>>
>> --
>> _______________________________________________
>> Lazarus mailing list
>> Lazarus at lists.lazarus.freepascal.org
>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>




More information about the Lazarus mailing list