Graeme Geldenhuys schreef:
On 4/19/07, Vincent Snijders <[EMAIL PROTECTED]> wrote:
> +    if (FCurrentEdit is TCustomEdit) then
> +      TEdit(FCurrentEdit).SelectAll;

This doesn't look right, checking for TCustomEdit and then casting to TEdit.



That will work and does. TEdit doesn't implement anything new and all
that the cast is for, is to call the TCustomEdit.SelectAll() method.
Even if I changed the cast to TCustomEdit, it will end up calling the
exact same method.

I didn't say it would not work, just that it didn't look right. If you had added these lines as comment in the code, maybe you could have got away with it, but still it is confusing.


But to make things look consistent....  :-)
... Attached is a updated patch using TCustomEdit for the cast as well.

Applied. Thanks for the patch.

Vincent

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to