wxX11 no combobox update after selection changes
Jan Boehme
aiscape at hotmail.com
Wed Jan 17 03:01:33 PST 2007
Hi, I posted about this problem a few days ago.
Now, I can be a little more precise. The update/refresh/something fails
if the combobox was created using wxCB_READONLY.
Here are the steps:
Breakpoint 1, CContainer::OnButton1Click (this=0x9dadeb8,
event=@0xbfd3f56c) at ccontainer.cpp:167
(gdb) step
wxItemContainerImmutable::SetStringSelection (this=0x9db6574,
s=@0xbfd3f3c8) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/common/ctrlsub.cpp:62
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/common/ctrlsub.cpp:62:1854:beg:0x80bcc48
(gdb) step
0x08077a4a in non-virtual thunk to wxComboBox::FindString(wxString
const&, bool) const () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/iostream:76
/usr/include/c++/4.1.1/iostream:76:2877:beg:0x8077a4a
(gdb) step
wxComboBox::FindString (this=0x9db6368, s=@0xbfd3f3c8, bCase=232) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/univ/combobox.cpp:382
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/univ/combobox.cpp:382:10686:beg:0x8075e94
(gdb) step
(gdb) step
wxComboBox::GetLBox (this=0x9db6368) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/combobox.h:157
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/combobox.h:157:5723:beg:0x8077925
(gdb) step
wxListBox::FindString (this=0x9db6a28, s=@0xbfd3f3c8, bCase=false) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/listbox.h:108
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/listbox.h:108:4740:beg:0x8077b27
(gdb) step
wxString::operator char const* (this=0xbfd3f3c8) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:832
(gdb) step
wxStringBase::c_str (this=0xbfd3f3c8) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:527
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:527:19433:beg:0x805b63d
(gdb) step
0x08067909 in wxString::operator char const* (this=0xbfd3f3c8) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:832
(gdb) step
0x08077b36 in wxListBox::FindString (this=0x9db6a28, s=@0xbfd3f3c8,
bCase=false) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/listbox.h:108
(gdb) step
wxArrayString::Index (this=0x9dba060, sz=0x9db6ef4 "0", bCase=false,
bFromEnd=false) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/common/string.cpp:2247
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/common/string.cpp:2247:56609:beg:0x820e012
If I create the combobox using wxCB_SIMPLE everything works as expected
but I want the it in readonly mode.
Here the steps for the simple mode. There are no significant differences
imho.
COMBOBOX wxCB_SIMPLE
Breakpoint 1, CContainer::OnButton1Click (this=0x9a44eb8,
event=@0xbfbae3dc) at ccontainer.cpp:167
(gdb) step
wxItemContainerImmutable::SetStringSelection (this=0x9a4d574,
s=@0xbfbae238) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/common/ctrlsub.cpp:62
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/common/ctrlsub.cpp:62:1854:beg:0x80bcc48
(gdb) step
0x08077a4a in non-virtual thunk to wxComboBox::FindString(wxString
const&, bool) const () at
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/iostream:76
/usr/include/c++/4.1.1/iostream:76:2877:beg:0x8077a4a
(gdb) step
wxComboBox::FindString (this=0x9a4d368, s=@0xbfbae238, bCase=56) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/univ/combobox.cpp:382
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/univ/combobox.cpp:382:10686:beg:0x8075e94
(gdb) step
(gdb) step
wxComboBox::GetLBox (this=0x9a4d368) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/combobox.h:157
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/combobox.h:157:5723:beg:0x8077925
(gdb) step
wxListBox::FindString (this=0x9a50b78, s=@0xbfbae238, bCase=false) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/listbox.h:108
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/listbox.h:108:4740:beg:0x8077b27
(gdb) step
wxString::operator char const* (this=0xbfbae238) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:832
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:832:31553:beg:0x80678fe
(gdb) step
wxStringBase::c_str (this=0xbfbae238) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:527
(gdb) step
0x08067909 in wxString::operator char const* (this=0xbfbae238) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:832
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/string.h:832:31553:beg:0x8067909
(gdb) step
0x08077b36 in wxListBox::FindString (this=0x9a50b78, s=@0xbfbae238,
bCase=false) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/include/wx/univ/listbox.h:108
(gdb) step
wxArrayString::Index (this=0x9a51c28, sz=0x9a4e844 "0", bCase=false,
bFromEnd=false) at
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/common/string.cpp:2247
/home/boehme/develop/wxWidgets/wxWidgets-2.8.0_X11_DEBUG/src/common/string.cpp:2247:56609:beg:0x820e012
Can anyone help me out here?
Thanks a lot, jan.
More information about the wx-users
mailing list