[Lazarus] Delphi incompatibility - hard cast
Alejandro Gonzalo
parkingspace26 at yahoo.com
Fri Jan 31 23:30:16 CET 2014
Is there also a way of setting an event such as OnEnter for Sender or a Component in a loop (if the Event is defined in code and not with the Object Inspector)?
Thank you.
A. G.
On Friday, January 31, 2014 12:19 AM, Michael Van Canneyt <michael at freepascal.org> wrote:
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.
--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140131/6d46a004/attachment-0003.html>
More information about the Lazarus
mailing list