How to set event handlers via new RTTI? [D2010]
问题 Playing with new RTTI module, I couldn't find a way to set an event handler with the new utilities. Trying something like this: LProp := TRttiContext.Create.GetType(Form1.ClassInfo).AsInstance.GetProperty('OnClick'); LProp.SetValue(Form1, {a TValue!}); SetValue needs a TValue passed but I've yet to find a way to represent a TMethod via a TValue. Any comments? ps. And a side question.. It seems prefixing RTTI variables with "L" is a convention (and a good one IMO, meta code turns into a puzzle