[Iup-users] Re: [ANN] IUP 2.5 - Bug or feature?

Antonio Scuri scuri at tecgraf.puc-rio.br
Mon Apr 3 13:46:24 GMT+3 2006


   It's a bug! Thanks for reporting that.

   The fix is quite simple. In iup/srclua5/iuplua.c, the last 
parameter of lua_pcall must be 0, at lines:

274:
   int status = lua_pcall(L, nargs+2, 1, 0);

289
   int status = lua_pcall(L, nargs+2, 1, 0);

304
   int status = lua_pcall(L, nargs, nresults, 0);

   I will wait for more feedback on 2.5, then I can release a pacth 
or new binaries.

   If you need binaries now, please let me know for what platform.

Thanks,
scuri


At 19:00 2/4/2006, Aleksey Yutkin wrote:
>Hi Antonio,
>
>I try to execute this code:
>-- lua 5.0 
>---------------------------------------------------------------------------------------------
>iup_canvas = iup.canvas{size="300x140"}
>ml = iup.multiline{expand="YES", value=">>\n", border="YES"}
>iup_dialog = iup.dialog{iup.vbox{iup.frame{iup_canvas}, ml};
>title="IupCanvas & Canvas Draw"}
>iup.Show(iup_dialog)
>
>cd_canvas = cd.CreateCanvas(cd.IUP, iup_canvas)
>
>iup_dialog.cdCanvas = cd_canvas
>
>
>function make_point_cb(canvas, but, pressed, x, y,status)
>         if pressed == 1 then
>                 local width, heigth = cd.GetCanvasSize()
>                 y = heigth-y
>                 cd.Mark(x, y)
>                 print(false..true) --> Error in this line: attempt 
> to concatenate a
>boolean value
>         end
>   return iup.DEFAULT
>end
>
>iup_canvas.button_cb = make_point_cb
>cd.Activate(cd_canvas)
>cd.Font(cd.TIMES_ROMAN, cd.BOLD, 8)
>cd.Text(10, 10, "Test")
>iup.MainLoop()
>-----------------------------------------------------------------------------------------------
>After execute I have error message  "-2"
>
>
>Thanks,
>Aleksey Yutkin.




More information about the iup-users mailing list