Home » Community » Newbie corner » GridCtrl out-of-bound crash with test case
GridCtrl out-of-bound crash with test case [message #32629] |
Sun, 29 May 2011 20:17 |
|
bushman
Messages: 134 Registered: February 2009
|
Experienced Member |
|
|
Running the following code causes GridCtrl to crash:
ASSERT FAILED: Assertion failed in c:\upp\uppsrc\core\Vcont.h, line 33
i >= 0 && i < items
class Ma_app : public TopWindow {
public:
Ma_app() {
Zoomable().Sizeable();
for(int col = 0; col < 10; col++) {
grid.AddColumn(Format("col %d", col));
for(int row = 0; row < 10; row++) {
grid.Set(row, col , "x");
}
}
//VVVVVVVVVVV HERE COMES THE FAULT LINE VVVVVVVVVVVVV
grid.SelectRow(false).RowChanging(false);
Add(grid.SizePos());
}
GridCtrl grid;
};
GUI_APP_MAIN
{
Ma_app().Run();
}
Pressing Ctrl + LMB on a cell, just like when you do a Ctrl-selection, or anywhere in the grid, will trigger the exception.
What is GridCtrl::RowChanging(bool) for?
The crash happens when both GridCtrl::SelectRow and GridCtrl::RowChanging methods are combined.
Why? (bug?)
tks!
[Updated on: Sun, 29 May 2011 21:00] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Sat May 11 17:08:54 CEST 2024
Total time taken to generate the page: 0.04184 seconds
|