luabind::gettable simple exemple

"Nicolas Raby - Access-Dev.com" <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hello,

I experiencing difficulties with luabind::gettable

I ve googled about this, but cant find a simple exemple to get this 
simple job done:


lua script :

my_test_table = {1,10,20,30,40,50,60,70,80}


C++ :

// I need to access my_test_table values at different indexes

i try

int value = 
luabind::object_cast<int>(luabind::globals(L)["my_test_table"][0]);

but i get a crash,

same with test with luabind::gettable


Nico



------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
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.