[fpc-pascal] TReader.ReadProperty

Fred Flinestone ffred69 at gmail.com
Wed Nov 3 00:08:20 CET 2010


hi all,

i am trying to replace the code from delphi to fpc where the code looks
like:

TYPE THackReader =class(TReader);

...

    FReaderStream.Position := 0;
    {$IFDEF FPC}
    try
      FReader.ReadListBegin;
      while not FReader.EndOfList do begin
        THackReader(FReader).ReadProperty(Obj1);
      end;
      Freader.ReadListEnd;
    except
    end;

    {$ELSE}
    FReader.Position := 0;
    try
      while FReader.Position < FReaderStream.Size do
        THackReader(FReader).ReadProperty(Obj1);
    except
    end;
    {$ENDIF}


but my code in FPC raises an exception in ReadListBegin method and I am not
sure if it is correct way to read back properties to Obj1.

PS: How can I debug TReader class, because debuger steps over my calls from
TReader.

Thanx.

Fred.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20101103/3fef845c/attachment.html>


More information about the fpc-pascal mailing list