Page 1 of 1

Determine the Membership of a collection

Posted: Fri Aug 07, 2009 2:19 pm
by ConvertFromOldNGs
by Joseph O'Dwyer >> Sun, 12 Sep 1999 23:48:13 GMT

I have a collection property of an object of type Property and would like to determine the membership type of the collection. Does anyone know how to do this.

Joseph O'Dwyer

Re: Determine the Membership of a collection

Posted: Fri Aug 07, 2009 2:19 pm
by ConvertFromOldNGs
by Torrie Moore >> Mon, 13 Sep 1999 5:40:56 GMT

The CollClass class has a method getMemberType that returns the type of the members in a collection. For Example the following code fragment will assign Object to the variable c and then write Object on the screen.

vars
oa : ObjectArray;
c : Type;begin

create oa transient;
c := oa.class.CollClass.getMemberType;
write c.name;
delete oa;
end;

Torrie Moore
Concept Engineering