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 » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl - WhenRemoveRow doesn't work
GridCtrl - WhenRemoveRow doesn't work [message #19699] Tue, 06 January 2009 10:49 Go to next message
lokki is currently offline  lokki
Messages: 20
Registered: November 2005
Promising Member
I think, I have found a bug in GridCtrl, when trying to remove row from datasbase using GridCtrl's WhenRemoveRow callback. Fragment from GridCtrl.cpp:

if(call_whenremoverow)
{
	#ifdef LOG_CALLBACKS
	LGR(2, "WhenRemoveRow()");
	LGR(2, Format("[row: %d]", rowidx));
        WhenRemoveRow();
	#endif
}


This will call the method only in DEBUG mode. My executable is build in "Size" mode and GridCtrl doesn't call the method.

I'm using upp 2008.1 release, but looks like the bug is stil in repository ( http://www.google.com/codesearch/p?hl=en#RuY_ZbqIwV4/trunk/u ppsrc/GridCtrl/GridCtrl.cpp&q=GridCtrl.cpp%20package:htt p://upp-mirror\.googlecode\.com)

Please correct me, if I'm wrong.. Smile

[Updated on: Tue, 06 January 2009 10:50]

Report message to a moderator

Re: GridCtrl - WhenRemoveRow doesn't work [message #19700 is a reply to message #19699] Tue, 06 January 2009 11:35 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

lokki wrote on Tue, 06 January 2009 11:49

I think, I have found a bug in GridCtrl, when trying to remove row from datasbase using GridCtrl's WhenRemoveRow callback. Fragment from GridCtrl.cpp:

if(call_whenremoverow)
{
	#ifdef LOG_CALLBACKS
	LGR(2, "WhenRemoveRow()");
	LGR(2, Format("[row: %d]", rowidx));
        WhenRemoveRow();
	#endif
}


This will call the method only in DEBUG mode. My executable is build in "Size" mode and GridCtrl doesn't call the method.



Add:
bool GridCtrl::Key(dword key, int)
{
	if(!IsReadOnly())
	switch(key)
	{
		case K_ENTER:
			ClearSelection();
			#ifdef LOG_CALLBACKS
			LGR(2, "WhenEnter()");
=>>HERE			WhenEnter();
			#endif
...
Re: GridCtrl - WhenRemoveRow doesn't work [message #19708 is a reply to message #19699] Tue, 06 January 2009 16:44 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Yes, it's a bug. WhenRemoveRow should be below #endif.
Thanks!
Previous Topic: GridCtrl - crashes on UBUNTU.
Next Topic: GridCtrl: Find and Select Row after Keypress
Goto Forum:
  


Current Time: Wed Apr 24 05:08:42 CEST 2024

Total time taken to generate the page: 0.02407 seconds