I am trying to use the wxBitmapComboBox but it seems to
crash on me while I either try to set or get its selection using
SetStringSelection or GetStringSelection.

example: add the following line to samples/controls.wx.lua
(line 514)

-- -----------------------------------------------------------------------

    control = wx.wxBitmapComboBox(scrollWin, ID_BITMAPCOMBOBOX,
"wxBitmapComboBox",
                                         wx.wxDefaultPosition, wx.wxDefaultSize,
                                         {"Item 1", "Item 2", "Item 3
text is long to check default size"},
                                         wx.wxTE_PROCESS_ENTER) --
generates event when enter is pressed
    control:Append("Appended w/ bitmap", bmp)
    control:Insert("Inserted at 0 w/ bitmap", bmp, 0)
    control:SetItemBitmap(2, bmp)
    control:SetStringSelection("Item 1"); // #####ADD THIS LINE####
    AddControl("wxBitmapComboBox", control)

    -- -------------------------------------------------------------------

I seem to get the crash both on Windows XP and linux. Windows with
somewhat aged CVS version, and Linux with up to date CVS.

with the test shown above the crash possibly happens in
wxLua_wxControlWithItems_SetStringSelection .

When doing GetStringSelection the crash happens somewhere
0xdddddddd
t_console!wxItemContainerImmutable::GetStringSelection+0x4b
t_console!wxLua_wxControlWithItems_GetStringSelection+0x4e

I get the feeling that something is broken in the class inheritance
either in wxLua or wxWidgets side...


          Eero

------------------------------------------------------------------------------
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to