void wxXmlResource::AddHandler(wxXmlResourceHandler *handler)
{
- m_handlers.Add(handler);
+ m_handlers.Append(handler);
handler->SetParentResource(this);
}
void wxXmlResource::InsertHandler(wxXmlResourceHandler *handler)
{
- m_handlers.Insert(handler, 0);
+ m_handlers.Insert(handler);
handler->SetParentResource(this);
}
void wxXmlResource::ClearHandlers()
{
- WX_CLEAR_ARRAY(m_handlers);
+ WX_CLEAR_LIST(wxList, m_handlers);
}
return CreateResFromNode(©, parent, instance);
}
+ wxXmlResourceHandler *handler;
+
if (handlerToUse)
{
if (handlerToUse->CanHandle(node))
+ {
return handlerToUse->CreateResource(node, parent, instance);
+ }
}
else if (node->GetName() == wxT("object"))
{
- for ( wxXmlResourceHandlers::iterator i = m_handlers.begin();
- i != m_handlers.end(); ++i )
+ wxList::compatibility_iterator ND = m_handlers.GetFirst();
+ while (ND)
{
- wxXmlResourceHandler *handler = *i;
+ handler = (wxXmlResourceHandler*)ND->GetData();
if (handler->CanHandle(node))
+ {
return handler->CreateResource(node, parent, instance);
+ }
+ ND = ND->GetNext();
}
}