Page 1 of 1

wxGridBagsizer error

Posted: Fri Jun 07, 2013 2:16 am
by evstevemd
What it currently does

Code: Select all

wxGridBagSizer* gridBagSizer9 = new wxGridBagSizer(0, 0);
 gridBagSizer9->AddGrowableCol(1);
//other grid code follows
This causes assert error (not fatal yet)

Code: Select all

/src/common/sizer.cpp(1979): assert "!m_cols || idx < (size_t)m_cols" failed in AddGrowableCol(): invalid column index
adding line

Code: Select all

gridBagSizer9->AddGrowableCol(1);
at the end of grid operations gridBagSizer9 resolves the issue!

Re: wxGridBagsizer error

Posted: Thu Sep 05, 2013 2:06 am
by smitchell
Seeing same problem here with wxGridBagSizer
CL 5.2, wxWidgets 2.94, MinGW 4.7.1, wxCrafter 1.2, Windows 7-x64

Code: Select all

Assert:  ../src/common/sizer.cpp(1956): assert "!m_cols || idx < (size_t)m_cols" failed in AddGrowableCol(): invalid column index.
From my wxCrafter generated gui.cpp, the offending lines are the AddGrowableCol() calls ...

Code: Select all

    wxGridBagSizer* gridBagSizerSourceDescription = new wxGridBagSizer(0, 0);
    gridBagSizerSourceDescription->AddGrowableCol(1);
    gridBagSizerSourceDescription->AddGrowableCol(4);
    gridBagSizerSourceDescription->AddGrowableRow(4);

Re: wxGridBagsizer error

Posted: Thu Sep 05, 2013 10:10 am
by eranif
Thanks for reporting this, it is now fixed

Eran

Re: wxGridBagsizer error

Posted: Thu Sep 05, 2013 9:11 pm
by smitchell
Thanks for the quick response!
I'll be watching for the wxC 1.3 release.