Chris Kelling schrieb:
It is confirmed - I forgot about ANSISTRING being a pointer type, and
when I was writing the record out it wrote the address, not the data.
Of course, when I read it back in, the address was not valid and this
caused the error (derefrencing the non-existent pointer).
I often read that users don't need to bother about implementation
details of certain things (strings or dynamic array types or ...).
This clearly shows how important such informations are and that generic
types are pitfalls.
You never realy know what you get.
If you would have used AnsiString instead of the generic String you
would have got an error
and so would have been reminded that your assumptions (AnsiStrings) are
not valid.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus