Determine the Membership of a collection

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Determine the Membership of a collection

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:19 pm

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

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Determine the Membership of a collection

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:19 pm

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


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 4 guests