On 23.12.2011 20:04, silvioprog wrote:
Hi,

I tried to access the FScanner field from the TJSONParser, but without
sucess. x(

[snip]

The error:

Error: identifier idents no member "FScanner".

So, FPC 2.7.1 support this sintaxe?:
http://stackoverflow.com/questions/8330003/access-a-strict-protected-property-of-a-delphi-class

In FPC 2.4.4 I use only:

   TJSONParserHelper = class(TJSONParser)
   public
     property Scanner: TJSONParser read FScanner;
   end;

Thanks.


Your code is principially correct, but your assumption is not: you can not access (strict) private fields using a class helper. Only (strict) protected, public and published are supported (this is the same in Delphi btw.).

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to