Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Rado Manzela
|
Feb 19, 2007 - 10:56 AM
|
When I call CExtTreeGridWnd::ItemGetFirstChild() at item which contains no children, it asserts in CExtTreeGridCellNode::TreeNodeGetChildAt( ULONG nPos ) at line ASSERT( nPos < ULONG(m_arrChildren.GetSize()) ); Shouldn’t it return NULL instead?
|
|
Rado Manzela
|
Feb 21, 2007 - 8:28 AM
|
ok. in the demo , function CChildView::OnUpdateTreeDeleteFocusedChildren().... replace ItemGetChildCount() like this :
void CChildView::OnUpdateTreeDeleteFocusedChildren(CCmdUI* pCmdUI) { HTREEITEM htiFocus = ItemFocusGet(); if( htiFocus == NULL || ItemGetFirstChild( htiFocus ) == NULL // || ItemGetChildCount( htiFocus ) == 0 )
then focus last child and it will assert
|
|
Technical Support
|
Feb 22, 2007 - 10:35 AM
|
We confirm this issue. To fix it, please update the source code for the CExtTreeGridCellNode::TreeNodeGetChildAt() method in ../Src/ExtTreeGridWnd.cpp: CExtTreeGridCellNode * CExtTreeGridCellNode::TreeNodeGetChildAt( ULONG nPos )
{
ASSERT_VALID( this );
if( m_arrChildren.GetSize() == 0 )
return NULL;
ASSERT( nPos < ULONG(m_arrChildren.GetSize()) );
CExtTreeGridCellNode * pNode = m_arrChildren.GetAt( nPos );
ASSERT_VALID( pNode );
ASSERT( pNode->m_nOptIndex == nPos );
return pNode;
}
|
|
Rado Manzela
|
Feb 20, 2007 - 11:02 AM
|
I’ve tried the last 2.63.4 code and the bug is still there.
|
|
Technical Support
|
Feb 21, 2007 - 3:06 AM
|
In this case we would like to ask you to help us reproduce the problem. Would you modify this test project to reproduce this assertion failure?
|
|
Technical Support
|
Feb 20, 2007 - 3:25 AM
|
Thank you for reporting the bug. It is fixed in the latest code (2.63.4) available from our ftp site.
|
|