Re: [Lazarus] Can't assign event procedure....

2018-10-14 Thread Bo Berglund via Lazarus
On Sun, 14 Oct 2018 17:51:09 +0200, Bo Berglund via Lazarus wrote: >On Sat, 13 Oct 2018 21:00:51 +0200, Bo Berglund via Lazarus > wrote: > >>Sorry for the noise. >> >This is just a test of posting via GMane since my posts on the fpc >list have been rejected. Reason unknown to me. Worked for years

Re: [Lazarus] Can't assign event procedure....

2018-10-14 Thread Bo Berglund via Lazarus
On Sat, 13 Oct 2018 21:00:51 +0200, Bo Berglund via Lazarus wrote: >Sorry for the noise. > This is just a test of posting via GMane since my posts on the fpc list have been rejected. Reason unknown to me. Worked for years until now... -- Bo Berglund Developer in Sweden -- ___

Re: [Lazarus] Can't assign event procedure....

2018-10-13 Thread Bo Berglund via Lazarus
On Sat, 13 Oct 2018 20:43:43 +0200, Bo Berglund via Lazarus wrote: >type > TRxEvent = procedure (const Buffer: TBytes) of object; Of course posting here is the best way to actually discover the solution just a few minutes afterwards... The const specifier was missing in the implementation on t

Re: [Lazarus] Can't assign event procedure....

2018-10-13 Thread Vojtěch Čihák via Lazarus
Did you try simply to add "const"?   V. __ Od: "Bo Berglund via Lazarus" Komu: laza...@lists.lazarus.freepascal.org Datum: 13.10.2018 20:43 Předmět: [Lazarus] Can't assign event procedure What am I

Re: [Lazarus] Can't assign event procedure....

2018-10-13 Thread gabor via Lazarus
Missing "const" before Buf? procedure OnRxSS(*const* Buf: TBytes); W dniu 2018-10-13 o 20:43, Bo Berglund via Lazarus pisze: Then in the form unit where I want to use this: ... private ... procedure OnRxSS(Buf: TBytes); ... end; Regards, Michał. --

[Lazarus] Can't assign event procedure....

2018-10-13 Thread Bo Berglund via Lazarus
This is what I have: In a unit where a logging class is defined: type TRxEvent = procedure (const Buffer: TBytes) of object; ... TWiFiCommLogger = class(TThread) private ... FOnRxData: TRxEvent; ... public ... property OnRxData: TRxEvent read FOnRxData write FOnRxData; ...