From: John L. <jla...@gm...> - 2005-06-20 03:43:30
|
On 6/19/05, Ray Gilbert <ray...@sc...> wrote: > =20 > Currently we do not set the LUA_PATH when we run scripts.=20 > =20 > So the require() fn does not correctly find modules.=20 > > I have added GetLuaPath(), AddLuaPath() to my wxLuaInterpreter object, ca= n I > add it to wxLua?=20 Sure! I tried very hard to make it so that wxLua should be as close as I could make it to your version while keeping any fixes Paul and I made. Hopefully you can use it out of the box, but probably not, fit it up as necessary. In the beginning they'll be some growing pains as people change things to make it work better for them, but so long as it's done in a way to keep everything else working, nobody should complain. For example, it looks to me like wxLuaStateVariables should be renamed to wxLuaState, and it'll encapsulate just the lua_State and manage the memory. We can put all the tgetxxx and toxxx functions in the wxLuaState as static functions to make the code a little more readable. The wxLuaInterpreter will then just be a thin wrapper around the wxLuaState that provides even simpler methods and the wxLuaEvents. That way you can use either the simplier wxLuaInterpreter or the lighter wxLuaState as you see fit. =20 Anyway all I'm trying to say is that for a little bit now things may get ugly, but they'll settle down. The bottom line - I never want to go though the hassle of merging the different wxLuas again so if you need a feature, add it here so we can all benefit. Ray - do you want to put your extra modules up at sourceforge? That way when people change something they can also compile those and fix them up if necessary so there won't be too much breakage. > BTW=20 > =20 > I currently only add script path -=20 > But should we have standard wxLua search path?=20 > Should it search OS PATH?=20 > Are there other paths it should search by default, e.g. <app>/lua/?.lua; > <script>/lua/?.lua;=20 I thought that require searches typical system places already? I haven't any thoughts on this. -John Labenski |