[JSCodeGen] Retrieve Class from String (Class Name)
Issue #251
new
Hello,
Is it possibile please to retrieve a class from its class name?
I explain:
type
TMyClass = class
end;
TMyClassClass = class of TMyClass;
var cls: TMyClassClass;
cls := FindClass("TMyClass")
var c:= cls.Create();
Thank you so much.
Comments (2)
-
reporter -
reporter Unless ther is an option {$ NoObfuscate} that I can put after class declaration so that class name is leaved as is.
- Log in to comment
I can do like this
It works but when the code is compiled with obfucation and minimization options, TMyClass name is changed to another shorter name like “T0” so eval(“TMyClass”) will not work.