List all the methods from a base class?
Posted: 19 May 2017, 13:33
How can we list all the methods from a baseClass?
The following will work by explicitly using MyClass by name, but how can we use this to get the methods myMethod1 and myMethod2?
The following will work by explicitly using MyClass by name, but how can we use this to get the methods myMethod1 and myMethod2?
Code: Select all
myc := new MyClass()
return
class MyClass extends BaseClass
{
myMethod1() {
}
myMethod2() {
}
}
class BaseClass
{
__New(init := false)
{
if (!init)
{
;The commented does not work
;myc := new this(true)
;for k, v in myc
for k, v in MyClass
{
MsgBox, % k "`n" v
}
}
}
}