Hi.
We discovered a bug in your MXML library. This bug is
located in insertBefore and insertAfter methods. It
regards about missing pointer link on m_prev (for
insertAfter) and m_next (for insertBefore).
Following code is a functional patch:
void Node::insertBefore( Node *node )
{
node->m_next = this;
node->m_prev = m_prev;
node->m_parent = m_parent;
// HERE IS OUR PATCH
if( m_prev )
m_prev->m_next = node ;
/* puts the node on top of hierarchy if needed */
if ( m_parent != 0 && m_parent->m_child == this )
m_parent->m_child = node;
m_prev = node;
}
void Node::insertAfter( Node *node )
{
node->m_next = m_next;
node->m_prev = this;
node->m_parent = m_parent;
// HERE IS OUR PATCH
if( m_next )
m_next->m_prev = node ;
/* puts the node on bottom of hierarchy if needed */
if ( m_parent != NULL && m_parent->m_last_child ==
this )
m_parent->m_last_child = node;
m_next = node;
}
Hope that this will fix your bug.
Regards,
Tony & Marco.