[fpc-pascal] Moving callbackfunctions to class
Paul Ishenin
webpirat at mail.ru
Sat Jan 1 12:18:39 CET 2011
31.12.2010 20:01, Darius Blaszyk wrote:
> On Dec 31, 2010, at 10:43 AM, Paul Ishenin wrote:
>
>> 31.12.2010 7:53, Darius Blaszyk wrote:
>>> I installed 2.5.1 just to test if it was possible to use static class methods or not. Apparently not so it seems. It was a good try, but it failed. Thanks anyway for the help and explanation Jonas.
>> Try {$mode delphi}.
>>
> Thanks for the tip Paul. Unfortunately it did not help. See for the results below.
>
> Delphi mode:
>
> class -> Error: Incompatible types: got "class TfpgGLApplication.CDisplayFunc; CDecl;" expected "<procedure variable type of procedure;CDecl>"
>
> static -> Error: Incompatible types: got "class TfpgGLApplication.CDisplayFunc; CDecl; Static;" expected "<procedure variable type of procedure;CDecl>"
You need to create a static class procedure. But I just checked with fpc
- it indeed fails to compile while delphi compiles fine.
Best regards,
Paul Ishenin
More information about the fpc-pascal
mailing list