- if (n->GetType() == wxXML_ELEMENT_NODE)
- {
- bool old_ins = m_IsInside;
- m_IsInside = FALSE;
- m_IsInside = old_ins;
- wxObject *item = CreateResFromNode(n, m_Notebook, NULL);
- wxWindow *wnd = wxDynamicCast(item, wxWindow);
-
- if (wnd)
- m_Notebook->AddPage(wnd, GetText(_T("label")),
- GetBool(_T("selected"), 0));
- else
- wxLogError(_T("Error in resource."));
- return wnd;
- }
- n = n->GetNext();
+ bool old_ins = m_isInside;
+ m_isInside = FALSE;
+ m_isInside = old_ins;
+ wxObject *item = CreateResFromNode(n, m_notebook, NULL);
+ wxWindow *wnd = wxDynamicCast(item, wxWindow);
+
+ if (wnd)
+ m_notebook->AddPage(wnd, GetText(wxT("label")),
+ GetBool(wxT("selected"), 0));
+ else
+ wxLogError(wxT("Error in resource."));
+ return wnd;
+ }
+ else
+ {
+ wxLogError(wxT("Error in resource: no control within notebook's <page> tag."));
+ return NULL;