Sgqvur
FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
- Reaction score
- 62
Hm... Maybe I've asked this one before but anyway:
How to use the ExecuteFunc native which takes a string, i.e function/static method's name to "execute" a static method?
How to use the ExecuteFunc native which takes a string, i.e function/static method's name to "execute" a static method?
JASS:
struct STRUCT
static method FUNCY takes nothing returns nothing
call BJDebugMsg("If instead of ")
call BJDebugMsg("ExecuteFunc, .evaluate()")
call BJDebugMsg("or .execute()")
call BJDebugMsg("are used then")
call BJDebugMsg("this will be copied in")
call BJDebugMsg("another function")
call BJDebugMsg("the problem is that")
call BJDebugMsg("the static method is quite long")
call BJDebugMsg("I can039;t believe I actually wrote that =)")
endmethod
static method onInit takes nothing returns nothing
//call FUNCY.evaluate()
//call FUNCY.execute()
call ExecuteFunc(????)
call ExecuteFunc("s__STRUCT_FUNCY") // works but ... it's "way too hacky"
call ExecuteFunc("s__LIBRARY___STRUCT_FUNCY") // even worse if the struct is private
endmethod
endstruct