DefineClassByRTTI() - missing properties

Hello,



Delphi 10.1 Berlin, Scripter.DefineClassByRTTI(TButton, '', [mvPublic, mvPublished], True);



The above DefineClassByRTTI(TButton, ...) doesn't define all properties. Missing properties, for example, are Parent, Left, Top, Width, ... I know I can define these properties with DefineProp() but I wonder why these properties are not defined. Since I don't know the rules I must always check if the property is defined or not.



TIA and best regards

Branko

Hello,


use this code:

  Scripter.DefineClassByRTTI(TButton, '', [mvPublic, mvPublished], True, TRedefineOption.roOverwrite);

The TRedefineOption will make sure that even if the class (or its ancestors) are defined in the scripting system, all the methods and properties will be redefined (registered).