-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with CppBindClass::addConstant #61
Comments
The meta method seems to have some problem, some changes lost during re-factoring the code, I will fix it ASAP. |
Thank you for your prompt fix, it works perfectly! Now I can merge some modules that I had to use only for enums constants with classes |
I am seeing this same issue @SteveKChiu CPP LuaIntf::LuaBinding(_lua).beginClass<InputHandler>("InputHandler")
.addConstructor(LUA_ARGS())
.addFunction("keyHeld", &InputHandler::keyHeld)
.addConstant("KEY_RIGHT", GLFW_KEY_RIGHT)
.addConstant("KEY_LEFT", GLFW_KEY_LEFT)
.addConstant("KEY_DOWN", GLFW_KEY_RIGHT)
.addConstant("KEY_UP", GLFW_KEY_UP)
.addConstant("constant", 10)
.endClass(); lua
output
Seems it is not adding these constants at all. |
@inDigiNeous |
Yes constant need to be accessed by class name, not by instance. |
I'm stuck with a problem with CppBindClass::setConstant but after several hours I haven't solved it yet.
CPP:
Lua:
TDM GCC 4.9.2 64 bit under WIndows 7 with LuaJIT 2.0.3
Unfortunately it seems that I'm unable to solve this myself... any advice?
Thank you again very much
The text was updated successfully, but these errors were encountered: