My code implements a sort of assertions system for validating functions arguments.
I cannot determine the real class of an object. Imagine a hierarchy as the following
MyView = Core.class(Sprite)
MainScreen = Core.class(MyView)
Object -> Sprite -> MyView -> MainScreen
Calling getClass() and getBaseClass() on a MyView object the runtime returns respectively: Sprite and Object.
Even this tests fails
Thank you all
I can see why Gideros doesn't set it for lua classes, it is because it has no way of knowing how you named your class! That could be added as a third arg to Core.class maybe ? Second arg is already used for base class parameters.
Yes that is the solution I was trying to implement as a workaround
I have also searched for info about macros... but I cannot make it compile. Is it yet available the "macro" plugin? It seems that it can permit to create some interesting macros as the following:
This can help you however: https://wiki.giderosmobile.com/index.php/Macro_Functions
I'm basing on this post, if it's valid yet: http://forum.giderosmobile.com/discussion/comment/48204/#Comment_48204
But I'm not able to make it work.
However I've already implemented my helper functions: