Re: return_stl_iterator acting as const?

James Porter <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
John Smith wrote:
> Lua code:
> function LuaFunction( cont )
>     print (cont.containervalue)
>     cont.containervalue = 30
>     for things in cont.vec
>     do
>         print (things.value)
>         things.vlaue = 5
>     end
> end

It looks like you're using the wrong syntax for getting at your members. 
In Lua, "." is similar to "::" in C++, while ":" in Lua is similar to 
"." in C++. You want cont:containervalue, cont:vec, and so on. The 
former is working because you're defining a new static variable, 
essentially.

- Jim

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
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.