Hi,
I have some where I would like to externally declare some behaviour. I would like to do by just passing a function to the handler, but MonkeyC is not functional. I can declare the methods on a single class but apparently there is no usable introspection mechanism to discover them (the "has" operand seems to need an obscure symbol which I could not generate on the fly yet). I could pass anonymous objects with a fixed name function to emulate reference on a function, but I could not find a way to have anonymous classes in monkey c.
So, for now, what I do is :
-Declare classes with a fixed name static function
-Pass my library an array of classes
This works, but is very verbose and if I forget to add one class to the array, I have bug.
Is there a way to achieve this simple thing : pass a set some behaviours as a parameter to a method or let the library discover it ?
Thank you,
Fabien.