[Lazarus] Delphi incompatibility - hard cast
Alejandro Gonzalo
parkingspace26 at yahoo.com
Fri Jan 17 23:05:07 CET 2014
In Delphi this will work even if the Sender is not a TdbGrid, as long as it has a DataSource property:
TdbGrid(Sender).datasource:=myDataSource;
But it won't work in Lazarus if Sender is a different dbAware component., the compiler will complain it's not a dbGrid.
Is there anyway to accomplish this same result in Lazarus, perhaps by using RTTI? Or is there a compiler directive to stop this check?
An example would be great. Thanks.
A. G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140117/40a92f33/attachment-0002.html>
More information about the Lazarus
mailing list