On Mon, Oct 27, 2008 at 3:57 PM, klaas.holwerda <[EMAIL PROTECTED]> wrote: > John Labenski wrote: >> I changed it so that it does not create a "new" instance of the >> returned pointer and try to run the copy constructor on it, but rather >> it just pushes the pointer to the object into Lua. This means that the >> object must exist for the life of any Lua calls to it. >> >> Hope it works now. >> > This looks to work now, at least it compiles, will test it in lua soon. > But it only works when a pointer is returned, not for a reference. > The next is still wrong (actually looking at the generated code, i think > you made a mistake somehow). > Here what is generated, when returning a reference, and after a > corrected version. > > // %operator a2dVpathSegment& operator[](size_t index) const > static int LUACALL wxLua_a2dVectorPath_op_index(lua_State *L)
Should be fixed now. I added this test to wxcore_gdi.cpp %operator wxVideoMode& operator[](size_t nIndex) -John ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users