-
Bug in the Lua’s Luna Wrapper
Posted on 7 November 2009 Neill 2 commentsLuna wrapper for integrating C + + classes under Lua is quite handy and compact.
http://lua-users.org/wiki/LunaFour
But recently I decided to try its fourth version, where implemented properties and operations (assignment, add, etc.). So the property was getting the value from my class, but property didn’t want to set a value. It turned out that in the class Luna overrides __setindex method as the destination value.
I looked at the documentation on meta methods http://lua-users.org/wiki/MetamethodsTutorial
and found that I nee to override actually __newindex method
Please make the appropriate changes to the code Luna and it will work!
Programming Lua, Luna, Script, Tips2 Responses to “Bug in the Lua’s Luna Wrapper”
-
А для чего ты используешь Luna?
Мы вот используем LuaPlus )) -
в Луа я не преследую целей повторить ООП, поэтому пишу без каких-либо оберток, чистый Луа. В этом преследую еще и цель минимизации памяти и размера дистрибутива, что очень важно для моей задачи. А Луна в данном случае это больше парочка демо функций как пользоваться Луа, чем какая-то обертка.
Leave a Reply
You must be logged in to post a comment.
-

English
Russian
Recent Comments