[DUG] Is it a bug in latest version of Delphi?

Jolyon Smith jsmith at deltics.co.nz
Tue Feb 16 12:11:24 NZDT 2010


> The reason why -1 raises an error is because some of the called
> Windows API functions will return -1 to indicate an index error.

Yep, but since the VCL provides insulation from the API it should be testing
index errors *before* using them in order to eliminate and report such
errors more reliably, rather than conflating such easily eliminated errors
with unfortunately chosen windows API return codes.

To that extent it's a bug in the VCL.  Especially when the VCL then acts (as
in this case) to turn an API return code into an exception, rather than
passing it back thru to the application for handling (and note that in BDS
2006 (at least) the VCL behavior is fixed for comboboxes but not for
listboxes).

imho

> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with
> Subject: unsubscribe



More information about the Delphi mailing list