U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » TreeCtrl » A [TreeCtrl] bug
Re: A [TreeCtrl] bug [message #14558 is a reply to message #14549] Mon, 03 March 2008 19:17 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Thanks for the bug report!

Well, that is not bad, but IMO

int    TreeCtrl::Find(Value key)
{
	for(int i = 0; i < item.GetCount(); i++)
		if(!item[i].free && Get(i) == key)
			return i;
	return -1;
}


is correct fix (well, Null key is unusual, but not impossible).

Note that Null asignments there are rather intended to release the memory....

Please check whether things work here (by replacing Find and commenting key = Null)!

Mirek

[Updated on: Mon, 03 March 2008 19:19]

Report message to a moderator

 
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: Mon Jul 06 00:55:16 GMT+2 2026

Total time taken to generate the page: 0.00589 seconds