From: John L. <jla...@gm...> - 2006-03-12 01:31:12
|
On 3/11/06, thegeek <ok...@on...> wrote: > Hi, I've been using lua in combination with litestep ( an alternative > shell for litestep ), litestep has a lslua module that allows themers to > use lua for scripting themes. Lslua uses lua 5.1 and has full support > for the new binary module spec. I'm not sure what litestep is, an xterm replacement? litestep.net? Their web page is broken for mozilla (in linux) and you cannot navigate to any of the tabs. > Is it currently possible to load wxlua as a lua "module"? No, see #3 below. > If not, how hard would it be to make it possible, what problems are there= ? > I'm not much of a programmer, but I've been looking at the latest > release, and it seems very nice, it would however be great if users > could use the normal lua 5.1 release to load wxlua, without having to > recompile the parent application. I agree that 5.1 "modules" should be something that wxLua should support. There are some issues however. 1) wxLua currently uses 5.0.2 so we'd have to upgrade to 5.1. Unfortunately this means that we have to rewrite some of our lua code since table.getn has disappeared. 2) In order to track coroutines we had to modify the lua source code. What has been added is a function that gets called when a coroutine creates a new lua_State. wxLua must be able to find the wxLua variables associated with the lua_State, these are the windows, events, data, etc. I'm not sure if there is another way to do this? Using a vanilla lua executable means that you cannot run coroutines, which may or may not be a problem for people. 3) Additionally for the "module" support we'd have to make it so that the wxWidgets event loop gets initialized. This should be possible and I believe that it was done before, but again figuring it all out will take some effort. I have not looked into what it takes to setup a module so I cannot make any promises. Hopefully for the next release we'll get to both of these things, but I cannot give any definite timelines for it. You can always run wxLua itself on the command line and it should work fine. For example $wxLua myluaprogram.lua merely runs your program if it contains wxlua code or just straight lua code. You can even run compat5.1.lua to load modules as was previous discussed in the luasocket thread. Regards, John Labenski |