-
Notifications
You must be signed in to change notification settings - Fork 348
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
New addConstant allows lua to modify the "constant" #273
Comments
My bad. I had to ask for unit tests at least. |
This seems to me more of a addVariable function, where the argument is stored as lua variable by copy directly, instead of being registered as property with getters and setters (and their corresponding metatables) so it is still useful and should produce leaner and faster lua access. Just a rename should be enough i think (plus unit tests of course). |
So to binding Enums we could instead do smth like this i suppose:
|
Is this intended? In addConstant what you are pushing is just a lua variable, not a constant as you are not registering a setter function erroring if called. You need to use
addProperty
withisWritable = false
. I could take your example with the enum, registering it with the addConstant then in lua you could modify the enum:The text was updated successfully, but these errors were encountered: