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 » TreeCtrl » A [TreeCtrl] bug
Re: A [TreeCtrl] bug [message #14592 is a reply to message #14558] Tue, 04 March 2008 11:52 Go to previous messageGo to previous message
huanghuan is currently offline  huanghuan
Messages: 10
Registered: December 2007
Promising Member
Thank you. I will check it in next version.
if key = Null is only an option and not added. the following may half time complex in invalid key situation.
int    TreeCtrl::Find(Value key)
{
	for(int i = 0; i < item.GetCount(); i++)
		if(item[i].free)
		{
			if(Get(i) == key)
				return -1;
		}
		else if(Get(i) == key)
			return i;
	return -1;
}

this is not good. key = Null is nessary. for memory release.
I hope add the "key = Null".
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FIX - Single Click does not open/close items
Next Topic: problem in Refreshing at end of tree
Goto Forum:
  


Current Time: Sun May 12 05:20:08 CEST 2024

Total time taken to generate the page: 0.01591 seconds