[fpc-pascal] Class vs Object type

Tomas Hajny XHajT03 at hajny.biz
Wed Apr 6 16:06:44 CEST 2016


On Wed, April 6, 2016 15:13, Vojtěch Čihák wrote:
> How can I do it?
>  
> When I try do:
>  
> TMyObj = object(TObject)
>  
> compiler tells me:
>  
> Error: The mix of different kind of objects (class, object, interface,
> etc) isn't allowed

You need to add unit Objects to the uses clause (see also the e-mail from
Sven).

Tomas


> ______________________________________________________________
>> Od: Tomas Hajny <XHajT03 at hajny.biz>
>> Komu: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
>> Datum: 06.04.2016 14:07
>> Předmět: Re: [fpc-pascal] Class vs Object type
>>
> On Wed, April 6, 2016 13:26, Michael Van Canneyt wrote:
>> On Wed, 6 Apr 2016, Graeme Geldenhuys wrote:
>
> True. Note that objects descended from TObject are automatically zeroed
> out as well as soon as one calls the constructor Init.
>
> Tomas





More information about the fpc-pascal mailing list