[fpc-devel] Illegal type conversion: "<enumeration type>" to"TObject"

Boian Mitov mitov at mitov.com
Fri Jul 18 00:16:58 CEST 2008


Now only if we can go ~15 years back in time and tell that to the original 
developers of VCL and things like TStrings and their data type ;-) . 
Unfortunately they take TObject only, and there are a lot of cases when 
casting other data types to it is needed. I wish it was not the case, but it 
is the reality :-( .

  With best regards,
    Boian Mitov

--------------------------------------------------------------------
Mitov Software
http://www.mitov.com
--------------------------------------------------------------------


----- Original Message ----- 
From: "Vinzent Höfler" <JeLlyFish.software at gmx.net>
To: "FPC developers' list" <fpc-devel at lists.freepascal.org>
Sent: Thursday, July 17, 2008 3:12 PM
Subject: Re: [fpc-devel] Illegal type conversion: "<enumeration type>" 
to"TObject"


> Apart from that I don't see any sense in such type of a typecast.
>
> If I were to store such things in a "generic" list data type I would use a 
> pointer list, not an object list, if alone to avoid the risk of 
> accidentally trying to "Free" such objects.
>




More information about the fpc-devel mailing list