With RttiContext.FindType('Classes.TStringList')
I get RttiType from TStringList without any problems. But with RttiContext.FindType('MyUnit.TMyClass')
I always get nil (of course, MyUnit in the uses section). Why? What's wrong?
Example:
unit MyUnit; interface uses Classes; type TMyClass = class(TStringList) end; implementation end. Main unit: ... uses MyUnit, ... var oCont: TRttiContext; oType: TRttiType; begin oCont := TRttiContext.Create; try oType := oCont.FindType('MyUnit.TMyClass'); <== oType = nil !! ...
source share