4

In the dwsDatabaseLibModule.pas unit, which is included with the engine, the constructor of a class is invoked by accessing the class through TProgramInfo.Vars[]. Analogously, I was thinking I could invoke the overloaded method in the same way: info.Vars['TMyClass'].Method['MethodName'].Call.

Using the IInfo.Method property there, how do I distinguish between the overloaded methods?

FHannes
  • 783
  • 7
  • 22
  • Virtual has nothing to do with overloading. Do you mean overriding? – Rob Kennedy Apr 03 '13 at 21:40
  • Sorry, a small hiccup in my explanation. I'll edit that. The problem is related to the overloading though. – FHannes Apr 03 '13 at 22:36
  • 1
    There is currently no way to pick a particular overloaded method through IInfo, and I'm not sure how it could be done in a convenient fashion. You have to go down to the TClassSymbol.Members to identify the overload you want, and can then create TInfoFunc from that. – Eric Grange Apr 05 '13 at 06:09
  • Could this be done without degrading the performance of the method? It would be convenient if there was a way to retrieve method info based on not only it's name, but also parameters. Or a way to retrieve all method infos with a specific method name, so the identification wouldn't degrade the performance too much. – FHannes Apr 09 '13 at 17:23

0 Answers0