Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Problem updating a wxCheckListBox's Item

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Problem updating a wxCheckListBox's Item
#3765
Posted by: 2004-04-08 16:15:15
hello list,

got a real obstinate problem, updating a wxCheckListBox's item:
using 2.4.2, MingGW on W2K.
To do so, created a wxDialog do change the data of the seleted Item. This Dialog
(own class) stores the changed data in memberdata, afterwords those should be put
in the cheklistbox by this:

m_arrayopendProfiles[m_p_notebook->GetSelection()].GetExcludes()->MdfExeptn(p_exc_path->get_value(), excl_index);
m_arrayopendProfiles is just an array, containing opend profiles...
[m_p_notebook->GetSelection()] returns the index
GetExcludes() returns a pointer to the checklistbox
MdfExeptn(wxString const&, int) calls wxListBox::SetString(int, wxString const&)
p_exc_path->get_value() returns the dialogs memberdata, the string (p_exc_path is the dialog's pointer)
excl_index is the selected index of the checklistbox (and is valid)

Now the problem:
The first time ( !!!afterwords it will work fine!!! ), I update an item, I get an assert:

../../src/msw/listbox.cpp(773): assert "wxAssertFailure" failed. (line number doesn't accore to http://g.yi.org/f.php?f=8812)

Here the range of the internal calls:

frame={level="0",addr="0x0045919d",func="wxListBox::SetString(int, wxString const&)",file="../../src/msw/listbox.cpp",line="530"}
frame={level="0",addr="0x004591e7",func="wxListBox::SetString(int, wxString const&)",file="../../src/msw/listbox.cpp",line="533"}
frame={level="0",addr="0x0045881c",func="wxListBox::IsSelected(int) const",file="../../src/msw/listbox.cpp",line="388"}
frame={level="0",addr="0x0045886a",func="wxListBox::IsSelected(int) const",file="../../src/msw/listbox.cpp",line="390"}
frame={level="0",addr="0x0057e707",func="wxWindow::GetHWND() const",file="../../include/wx/msw/window.h",line="180"}
frame={level="0",addr="0x0054a740",func="SendMessageA@16",file="../../include/wx/object.h",line="66"}

What I really can't imagine, why this will only happen the first time???

Best Regards
Achim
Message2. Re: Problem updating a wxCheckListBox's Item
#3794
Posted by: 2004-04-10 20:38:57
hi,

it's a "old" bug in my old version:
http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/src/msw/listbox.cpp

nice easter
Achim
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0