I came across what seemed to be a bug in the garbage collector in 5.0.2. In the printing sample "virtual" functions are set for the wxLuaPrintout which get called instead of the c++ functions. However in the print preview if you changed the size of the preview a few times the functions you set (even if global, not local) would get garbage collected.
Anyway, this prompted to me try 5.1 and so far the results are very good, this bug was fixed and it's MUCH FASTER! (yes using capitals is appropriate, it's pretty impressive) It compiles and runs using the "Makefiles" in the src dir of the apps/XXX dirs. All the samples have been updated, but not thoroughly tested. ------------------------- Some notes on the changes for 5.1 that I've come across, there's more... 1) lua 5.1 does not have an "include" dir so I faked it by copying the pertinent headers that we use into it. 2) All the sources are in lua/src, even the lua and luac programs. Please see modules/luaINSTALL for the list of files for each. (Francesco, could you update the bakefiles? I don't think your *.c trick will work anymore) 3) DO NOT CALL luaopen_XXX (eg luaopen_io for the io.XXX table). IT WILL CRASH after some invalid reads. You have to open the libs a little differently, I'm just using the function "luaL_openlibs" in lua/src/linit.c which loads them all, but shows you how to do it individually. 4) "for k, v in sometable do" is now "for k, v in pairs(sometable) do" 5) table.getn and table.setn are gone, use the #sometable to get the count of the consecutive integer indexes in a table. 6) math.mod -> math.fmod and string.gfind -> string.gmatch etc, see bottom of http://www.lua.org/manual/5.1/manual.html Regards, John Labenski ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Wxlua-users mailing list Wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users