How to call a Lua function which has been defined in a table ?

Nicolas Goles <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hello!,

I'm trying to call a Lua Function which has been defined inside a table:

table = {}

function table:test()
     print("Lua Rocks")
end


How can I call that function from C++ ? I'm trying to use 
*luabind::call_function* resulting in:

*terminate called after throwing an instance of 'luabind::error'
   what():  lua runtime error

*I tried :

             luabind::call_function<void>(L "table:test", NULL);

Help is appreciated :)

Thanks.

_Nicolas


-- 
Nicolas Goles Domic
Founder & Lead Developer
Gando Games <www.gandogames.com>

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.