Am 27.07.2015 11:37 schrieb "Mark Morgan Lloyd" <
[email protected]>:
>
> Now obviously I could have a separate property holding an enumeration,
but it's a pity that it's not possible to do something like
>
> case MainForm.OutputComponent of
> TListBox: begin end;
> TMemo: begin end;
> ...
> otherwise
> // Fatal exception since this is a serious programming error
> end;
I had already thought about a TClass-case myself, but the first problem is
whether the case labels should be strict ("x.ClassType = y") or loose ("x
is y") [for Strings and Ordinals that is no problem]. And if the latter,
what if the type is a TEdit, but you have labels for example for
TCustomEdit and TControl? Also ranges should probably not be allowed (e.g.
TControl..TEdit).
Regards,
Sven
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus