I've been building an application with the help of DialogBlocks. I have a GridBagSizer inside a wxDialog. The generated code for it looks like this:
Code: Select all
wxGridBagSizer* itemGridBagSizer46 = new wxGridBagSizer(0, 0);
itemGridBagSizer46->AddGrowableCol(1);
itemGridBagSizer46->AddGrowableCol(3);
itemGridBagSizer46->AddGrowableCol(5);
itemGridBagSizer46->SetEmptyCellSize(wxSize(10, 20));
itemStaticBoxSizer45->Add(itemGridBagSizer46, 1, wxGROW|wxALL, 2);
ASSERT INFO:
/var/tmp/portage/x11-libs/wxGTK-2.9.1/work/wxWidgets-2.9.1/src/common/sizer.cpp(1948): assert "!m_cols || idx < (size_t)m_cols" failed in AddGrowableCol(): invalid column index
BACKTRACE:
[1] wxOnAssert(char const*, int, char const*, char const*, char const*)
[2] ServiceDetailsDlg::CreateControls() /home/arkay/32Pro/NDE/NDE/servicedetailsdlg.cpp:330
[3] ServiceDetailsDlg::Create(wxWindow*, Service*, ServiceData*, int, wxString const&, wxPoint const&, wxSize const&, long) /home/arkay/32Pro/NDE/NDE/servicedetailsdlg.cpp:133
[4] ServiceDetailsDlg() /home/arkay/32Pro/NDE/NDE/servicedetailsdlg.cpp:117
[5] ServiceListCtrl::OnItemActivated(wxListEvent&) /home/arkay/32Pro/NDE/NDE/servicelistctrl.cpp:717
[6] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) cons)
[7] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[8] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[9] wxEvtHandler::ProcessEventLocally(wxEvent&)
[10] wxEvtHandler::ProcessEvent(wxEvent&)
[11] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[12] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) cons)
[13] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[14] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[15] wxEvtHandler::ProcessEventLocally(wxEvent&)
[16] wxEvtHandler::ProcessEvent(wxEvent&)
[17] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[18] g_closure_invoke()
[19] g_signal_emit_valist()
[20] g_signal_emit()
[21] gtk_propagate_event()
[22] gtk_main_do_event()
[23] g_main_context_dispatch()
[24] g_main_loop_run()
[25] gtk_main()
So the AddGrowableCol() calls generate this assertation, if I ignore them everything works. What am I missing here?
Thanks,
Rainer