Kurt

> You want the type of the object to be included in the type of the 
> collection?

That is what the current TCollection does

> 
> am I right to think you want this: 
> TMySet = set of (TMyClass);
> 
> MySet : TMySet;
> MyOtherClass : TMyOtherClass;
> 
> ...
> 
>   MySet.Add( MyOtherClass); // Error Here!!
> 

more

  var
     FItems: TSetof(TMyClass)

with FItems.Add do
try
  // assign properties to an object of TMyClass
finally
end;

And it is not possible without Type Casting (which is what TList does)

with TMyClass(FItems.Add) do
try
  // assign properties to an object of TMyClass
finally
end;

ttfn


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to