[fpc-devel] Iterator for array properties
Michael Van Canneyt
michael at freepascal.org
Sat Oct 10 16:58:38 CEST 2015
On Sat, 10 Oct 2015, Ondrej Pokorny wrote:
> 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 :(
The class does not need to have a default property to begin with, so it is somewhere logical.
Michael.
More information about the fpc-devel
mailing list