[fpc-devel] Iterator for array properties

Ondrej Pokorny lazarus at kluug.net
Sat Oct 10 16:38:54 CEST 2015


Oh, it would be so nice if default enumerator wasn't defined with the 
"GetEnumerator" function but with the default property:

   TTest = class
     // ...
     function GetObjectEnumerator: TTestObjectEnumerator;
     property Objects[Index: Integer]: TObject read GetObject enumerator 
GetObjectEnumerator; default;
   end;

In this case the default enumerator would always correspond with the 
default property. Now they can be completely different. But Embarcadero 
already made the decision, so it doesn't matter :(

Ondrej



More information about the fpc-devel mailing list