[lazarus] Setting a value using RTTI

Shane Miller SMiller1 at stvgb.org
Fri Dec 1 08:29:25 EST 2000


Question for all:  

Using RTTI howdo I set a property value?  In my source code for TComponentInterface.SetPropbyName I get the PPropinfo record for the property VISIBLE and I check the Setproc variable.  It's <> nil so I need to call it somehow.  I have a TMySetProc type that is a 

Procedure (const value) of Object;

In TComponentInterface I have a variable MySetProc of type TMySetProc.  I assign MySetProc by....

MySetProc := TMySetProc(SetProc^);

then I call it

MySetProc(Value);

It crashes.  Thoughts?
Shane







More information about the Lazarus mailing list