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 
<[email protected]> 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
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to