lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Jun 29, 2012 at 5:59 PM, Paul K <paulclinger@yahoo.com> wrote:
>>> lua -e 'require "wx"'
>> Gtk-Message: Failed to load module "canberra-gtk-module"
>> but it seems to be minimal, since all the samples seem to work.
>
> If you get wx samples to work, you should be able to try with ZeroBrane Studio.

yep, it launches! and it shows the tutorial docs, links work, etc.

weird UI issues:
  - there's no menubar.  only the same icon buttons as the examples
plus a "jump to function definition" popup menu
  - after trying to run a demo, the editor window floats on top of any
other window.
  - hitting the close window corner button doesn't kill it, but the
terminal shows an error:

Lua: Error while running chunk
src/editor/commands.lua:499: wxLua: Unable to call an unknown method
'ShowFullScreen' on a 'wxFrame' type.

(hitting Ctr-C (twice) at the terminal kills it)

execution issues:
  - at first didn't find the Lua executable.  no prob, just put a
./bin/lua => /usr/bin/lua link
  - the spirograph demo flashes a small window and dies with:

./turtle.lua:338: wxLua: Expected an 'unsigned integer' for parameter
1, but got a 'number'.
Function called: 'wxMilliSleep(number)'
01. wxMilliSleep(integer)
stack traceback:
	(command line):1: in function <(command line):1>
	[C]: in function 'wxMilliSleep'
	./turtle.lua:338: in function 'wait'
	./spirograph.lua:33: in function 'spiro'
	...ack-0.30/myprograms/zerobrane-lessons/05-running.lua:11: in main chunk
	[C]: in function 'dofile'
	(command line):1: in function <(command line):1>
	[C]: in function 'xpcall'
	(command line):1: in main chunk
	[C]: ?
Program completed in 0.12 seconds (pid: 26405).

this seems a (design?) glitch of wxLua, changing that line from

     else wx.wxMilliSleep(stillneed); return

to

    else wx.wxMilliSleep(math.floor(stillneed)); return

allows it to run and show some graphs.  still not sure if they look as
they should, and it only progresses while there's some events, like
moving the mouse inside the window.  if i keep still, the program
freezes.

in all, not bad for a first try, considering all the (squeaky) moving parts.

-- 
Javier