On 5/15/06, Damien Fagnou <[EMAIL PROTECTED]> wrote:

I try to send this to the list but it doesn`t go through ..

Humm, that's strange.

---------------------------------------------------------------------------------------------------
this is great news !!!!

 our pipeline is strongly based on lua and I can`t wait to put more wxLua in 
action !!

> A sample program called luamodule.wx.lua in that dir shows it working
> by simply creating a wxFrame. Test it from the
> wxLua/apps/luamodule/src dir using
> $../../../bin/lua luamodule.wx.lua

 this worked great , compile and run .

 but if I try
        lua luamodule.wx.lua

 I get an error of type :
        libwx_gtk2_wxlua-2.6.so: undefined symbol: wxLua_lua_getnewthreadhandler

 we have the standard lua 5.1 distribution installed , what is exactly the 
difference beetwen lua 5.1
 and lua include the wxLua distribution ?

 is it only the function enable by the  WXLUA_LUA_NEWTHREAD flag ?

We added some functions in lstate.c to track when a coroutine is
created, there's really nothing to them. This is unfortunately tricky
to "fix". In wxLua itself we want to have WXLUA_LUA_NEWTHREAD defined
so that coroutines will work, but for the luamodule we can't have it
defined for people who want to use a stock lua executable which means
that module/wxlua has to be compiled without it.

1) We could add a compiler option or new #define to NOT define
WXLUA_LUA_NEWTHREAD for people who want to use the module. Sounds
strange, but I think it should be on by default, hence the added
define undoes the default define.

2) Use the lua registry? Does it get copied for coroutine created
lua_States? If so then we don't need this hook at all. I had tried to
stick the wxLuaStateData into lua itself as a global variable, but
somehow it wasn't in the coroutine state, though other bits were.

The bottom line is that we need to associate each lua_State with our
wxLuaStateRefData and so things break if lua_States get created behind
our back as they do for coroutines.


For now, just edit the top of wxLua/modules/wxlua/src/wxlstate.cpp and
add this to undef it and that way it won't get compiled in.

#ifdef WXLUA_LUA_NEWTHREAD
#undef WXLUA_LUA_NEWTHREAD
#endif

 again thank you for your great work on bringing us wxLua !!!!

You're welcome, it's a work in progress...
   John Labenski


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Wxlua-users mailing list
Wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to