> On Sep 26, 2019, at 1:34 PM, Sven Barth via fpc-pascal
> wrote:
>
> And we should probably add a proper TObject enumerator to TObjectList.
>
I just assumed that had to be there! I’ll make a generic replacement like Ben
suggests.
Regards,
Ryan Joseph
On Thu, Sep 26, 2019 at 11:59 AM Ben Grasset wrote:
> -snip-
>
I meant to change the last part of the revised code example to:
for value in list do
because obviously the pointer cast is no longer necessary in that case.
___
fpc-pascal maillist -
Ryan Joseph schrieb am Do., 26. Sep. 2019, 17:37:
> Question I’ve always had. Why do I need to cast “value” to “pointer"
> otherwise I get: Incompatible types: got "Pointer" expected “TObject”
> error?. I don’t find this very helpful and it doesn’t really make sense
> even.
>
> var
> list: TObj
On Thu, Sep 26, 2019 at 11:37 AM Ryan Joseph wrote:
> Question I’ve always had. Why do I need to cast “value” to “pointer"
> otherwise I get: Incompatible types: got "Pointer" expected “TObject”
> error?. I don’t find this very helpful and it doesn’t really make sense
> even.
>
Well, TObjectLis
Question I’ve always had. Why do I need to cast “value” to “pointer" otherwise
I get: Incompatible types: got "Pointer" expected “TObject” error?. I don’t
find this very helpful and it doesn’t really make sense even.
var
list: TObjectList;
value: TObject;
begin
for pointer(value) in list d