[Lazarus] Delphi incompatibility - hard cast
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sat Jan 18 02:44:32 CET 2014
Alejandro Gonzalo schrieb:
> In Delphi this will work even if the Sender is not a TdbGrid, as long as
> it has a DataSource property:
It only *happens* to work for you in Delphi.
> TdbGrid(Sender).datasource:=myDataSource;
This hack requires that Sender has a DataSource property in *exactly*
the same place where it sits in TdbGrid. That's very unlikely for any
other class.
DoDi
More information about the Lazarus
mailing list