Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
bushman is currently offline  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

 
Read Message
Read Message
Read Message
Previous Topic: GridCtrl help needed
Next Topic: reading & writing a file
Goto Forum:
  


Current Time: Mon Apr 29 08:45:11 CEST 2024

Total time taken to generate the page: 0.02153 seconds