From: John L. <jla...@gm...> - 2006-04-03 01:27:58
|
On 4/2/06, Francesco Montorsi <f18...@ya...> wrote: > Leandro Motta Barros ha scritto: > > CVS was up, so I was able to try the very latest wxLua version. > strange: I still get errors when trying to access it - maybe only > developer CVS is down ? John, are you able to access it ? Not yet. :/ > > So > > far, I have just created a very simple C++application that links to > > wxLua and runs a script that creates an user interface (I just grabbed > > the script at wxLua's front page). > > > > I have just took a very quick look at the examples that come with > > wxLua, but it seems that the one I created is simpler than those, so > > it may be useful for other beginners, too. I've uploaded it to > > http://cscience.org/~lmb/MinimalEmbeddedWXLuaApp.zip. If the current > > distribution really lacks an example as simple as this one, please > > feel free to review and add this one to the distribution or to the > > wxLua page. This is hopefully what the "freeze" type program will do. It has to be written of course, but it'll be simple like yours. > > Up to this moment, I have only five notes: > > > > 1. My wxWidgets installation doesn't include wxSTC, and I had to You're using a RPM of wxWidgets or something else? > > manually pass the '--disable-wxbindstc' flag to the 'configure' > > script. It would be nice if 'configure' could test for 'wxSTC' > > presence and disable it automatically if it isn't found. > configure already tests for wxSTC... didn't you get a message 'wxSTC > could not be found etc etc' ? > > It does not disable it automatically if not found for choice: wxSTC is > required for both wxLuaApp and wxLuaEdit applications... if you don't > have wxSTC then you miss two nice apps ;) > > > 2. The file 'wxluasetup.h' was not installed by 'make install'. I had > > to copy manually. > this is sure a big problem - thanks for reporting it. > Fixed in CVS (wxluasetup.h was erroneously installed into > $PREFIX/src/wxbind/setup instead of $PREFIX/include/wxbind/setup) Thanks. > > 3. I think that the 'include' directory in '#include > > <wxbind/include/wxbind.h>' is a bit cumbersome (I would prefer just > > something like '#include <wxbind/wxbind.h>', for example). I can live > > with this, though. :-) > this was not to pollute the compiler line with a lot of include paths > (we would need one for each subfolder in modules\ ...). Agreed, this may not be "standard", but all you have to include is the modules dir to get everything. > > 4. I had to link with 'wxlua_gtk2_wxluasocket-2.6', even though I > > don't use sockets. Otherwise, I get some linking errors concerning > > names that I would expect to find at 'wxlua_gtk2_wxluadebug-2.6' > > instead: The problem is from the wxluasetup.h having #define wxLUA_USE_wxLuaDebugServer 1 which makes the wxlbind lib #include "wxluasocket/include/wxldserv.h" This is set by default so that the wxlua app program works. We had a discussion a while back about how to most simply allow multiple wxluasetup.h files to generate different wxbind libs for different programs, but found that "tricks" that would work for one compiler would fail for others. > > /usr/local/lib/libwxlua_gtk2_wxbind-2.6.so: undefined reference to > > `wxLuaDebugServer::DisplayStackDialog(wxWindow*)' > > /usr/local/lib/libwxlua_gtk2_wxbind-2.6.so: undefined reference to > > `wxLuaDebugServer::wxLuaDebugServer(int)' ... > > 5. Calling the Lua 'print()' function from a script run using > > 'wxLuaState::RunFile()' doesn't print anything at the terminal. Is > > this being redirected to somewhere? > these last two are meat for John, I think ;) It's being sent as an wxEVT_LUA_CONSOLE (see wxlstate.h) event from the function wxLua_lua_printFunction that's pushed on the lua_State, see bool wxLuaState::Create(wxEvtHandler *handler, wxWindowID id) I think you can just call wxLuaState::RegisterFunction(NULL, wxT("print")); to get back the original print function. or pushing the original function back will work lbaselib.c:static int luaB_print (lua_State *L) > > I'll now start to try doing some real work with wxLua. So far it looks = great! > > > > Regards and congratulations for the work, > Thanks! Thanks, John Labenski |