lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks Daniel,
 
I checked it out and its pretty cool. I have two questions:
 
1) Correct me here but It seems to me that it should be possible to combing LuaPlus and LuaBind at the same time? 
 
One of the things I like about LuaPlus is how it automatically handles creating the state and closing it with its LuaStateOwner class. On the other hand it doesn't seem to offer nearly as many options as LuaBind when it comes to letting Lua access C++ objects and just behave in a more OO way in general. 
 
Since LuaPlus's classes can provide access to the raw lua state pointer and other raw lua.h types, is there any reason why I can't use it to handle the runtime lifetime management and then rely on LuaBind to expose the innerparts of my C++ application?
 
2) I'm confused by the part of your documentation section entitled "Object" that starts out by saying: "Since functions have to be able to take lua values (of variable type) we need a wrapper around them." Just so I don't missunderstand, this is intended for functions we write that we know in advance will be interrop-ing with lua scripts and tables right? Its not required that all the functions I expose accept Object, since I saw plenty of examples in the docs that do not, just wanna be sure here.
 
Thanks, sorry for my verbose question style...
 
Benjamin

________________________________

From: lua-bounces@bazar2.conectiva.com.br on behalf of Daniel Wallin
Sent: Sun 7/27/2003 2:39 AM
To: Lua list
Subject: RE: Lua oop?



At 04:13 2003-07-27, Benjamin Freidlin wrote:
>I'm basically in the same situation. I'm only interested in being able to
>access and deal with my custom C++ class instances from a lua script.
>
>Currently I have been exploring LuaPlus, which is a very clean template
>library that makes embedding Lua pretty much a snap, almost too easy.
>However, I am still scratching my head as to how I am able to return
>objects to Lua and enable the Lua script to work with them.

<shameless plug>
Have you looked at luabind? (luabind.sf.net)
</shameless plug>

---
Daniel Wallin



<<winmail.dat>>