Control of luabind::objects
"Josh Klint" <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <000301cc1743$d326ba00$79742e00$@com> |
Is it possible to ensure luabind always uses the same Luabind::object for
any given C++ object? I am having problems because luabind is creating new
luabind::objects and returning those, without the information I attached to
the "real" object.
Example:
--"entity" is the luabind::object created for the C++ object
entity.health= entity.health -1
for child in entity.kids do -"kids" is an std::list exposed to LuaBind
child.health = child.health-1 -Can't access this because
luabind creates a new luabind::object and returns it, instead of returning
the one I created and pushed the "health" value onto
end
I would like to have a callback function LuaBind uses to get the actual
luabind::object I created and pushed onto the stack when I added values.
Right now, any values I add to a luabind::object will get lost if a function
returns an object, because a new empty luabind::object will be created.
Best Regards,
Josh Klint
CEO
Leadwerks Software
www.leadwerks.com
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user