#1 2015-06-03 21:03:00

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

DynArrayHashed with old objects

AB, I am using Delphi 7 and DynArrayHashed with success, to process a dictionary of a record. Thank you very much about this.

type
  TEspecie = record
    .. some fields here ..
  end;

But now I need to transform TEspecie in a old fashion object (not a class).

type
  TEspecie = object
    .. some fields here ..
    .. some methods here..
  end;

Can DynArrayHashed handle old objects? Will it work the same way?

Last edited by Junior/RO (2015-06-03 21:04:52)

Offline

#2 2015-06-04 05:32:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: DynArrayHashed with old objects

Yes, from the RTTI point of you, an object is just a record with methods.
So a TDynArrayHashed of an object would work just great.

Only non implemented feature is that virtual methods and constructors are not handled.
But I suspect you do not use those (buggy) features.

Offline

#3 2015-06-04 13:42:49

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

Re: DynArrayHashed with old objects

Yes, virtual methods for this type of object is very buggy in Delphi 7. Thank you, AB.

Offline

Board footer

Powered by FluxBB