lua-users home
lua-l archive

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


Hi,

Flemming Madsen wrote:
Hakki Dogusan wrote:

I translated mentioned sample to wxLua.

http://www.dynaset.org/dogusanh/download/wxluaimage.zip (448Kb)

Nice!

I was having a little trouble with a wxBitmap constructor though.


Thanks for reporting.

Line 654 in image.wx.lua goes like this:

this.my_smile_xbm = wx.wxBitmap( smile_bits, smile_width, smile_height, 1 )


Yes, I couldn't do it, and I put a comment "--FIXME didn't work!", at line 59.

and crashes like this when i run it:
[error message, stack traceback snipped]

wxLua.exe ("wxLua 2.8.4.2 build with wxWidgets 2.8.4" from About box) does not crashes here? Otherwise I would comment that code.

I assume that in your context it binds to this wxBitmap constructor signature: (From here <http://www.wxwidgets.org/manuals/2.6/wx_wxbitmap.html#wxbitmapctor>)

    *wxBitmap*(*const char*/ bits[]/, *int*/ width/, *int*/ height/
    *int*/ depth = 1/)

    Creates a bitmap from an array of bits.
[function signature analysis snipped]


I believe that your analysis is correct.

Are you using a different version of wxlua than the one on wxlua.sourceforge.net or am i simply doing something wrong


My wxLua is from wxLua-2.8.4.2-MSW-dll.zip file. Sorry, I should have comment that part.. I hope, wxLua guru John Labenski can fix my fault.



TIA /Flemming



--
Regards,
Hakki Dogusan