[Lazarus] Delphi incompatibility - hard cast
Michael Van Canneyt
michael at freepascal.org
Fri Jan 31 09:20:13 CET 2014
On Thu, 30 Jan 2014, Alejandro Gonzalo wrote:
> OK, how about a compiler switch (that can be turned on or off) that SEARCHES for the property (or event if defined
> in code and not by the Object Inspector)? It shouldn't be so difficult to deal with Sender (or components in a
> loop) where the exact Type is not known in advance, just the presence of a specific property or Event. If the
> switch can be turned Off again after the routine, the impact on performance shouldn't be a concern. Greater
> flexibility and ease of use, especially for newbies (RTTI is difficult and poorly documented) is needed if
> freepascal/Lazarus is to become universally adopted.
You just need to understand what you are doing, and use
SetObjectProp(Sender,'Datasource',MyDataSource);
that's all there is to it.
Michael.
More information about the Lazarus
mailing list