- wxCHECK_MSG(m_parentSizer != NULL ||
- (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE &&
- m_parentAsWindow != NULL &&
- (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
- m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||
- m_parentAsWindow->IsKindOf(CLASSINFO(wxDialog)))
- ), NULL,
- wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'."));
+ if ( !m_parentSizer &&
+ (!parentNode || parentNode->GetType() != wxXML_ELEMENT_NODE ||
+ !m_parentAsWindow) )
+ {
+ wxLogError(_("XRC syntax error: sizer must have a window parent."));
+ return NULL;
+ }