backported better classinfo test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "wx/xrc/xh_sizer.h"
|
||||
#include "wx/sizer.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/statbox.h"
|
||||
#include "wx/notebook.h"
|
||||
@@ -138,12 +139,12 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
|
||||
wxXmlNode *parentNode = m_node->GetParent();
|
||||
|
||||
wxCHECK_MSG(m_parentSizer != NULL ||
|
||||
((IsOfClass(parentNode, wxT("wxPanel")) ||
|
||||
IsOfClass(parentNode, wxT("wxWizardPage")) ||
|
||||
IsOfClass(parentNode, wxT("wxWizardPageSimple")) ||
|
||||
IsOfClass(parentNode, wxT("wxFrame")) ||
|
||||
IsOfClass(parentNode, wxT("wxDialog"))) &&
|
||||
parentNode->GetType() == wxXML_ELEMENT_NODE), NULL,
|
||||
(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_class == wxT("wxBoxSizer"))
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "wx/xrc/xh_sizer.h"
|
||||
#include "wx/sizer.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/statbox.h"
|
||||
#include "wx/notebook.h"
|
||||
@@ -138,12 +139,12 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
|
||||
wxXmlNode *parentNode = m_node->GetParent();
|
||||
|
||||
wxCHECK_MSG(m_parentSizer != NULL ||
|
||||
((IsOfClass(parentNode, wxT("wxPanel")) ||
|
||||
IsOfClass(parentNode, wxT("wxWizardPage")) ||
|
||||
IsOfClass(parentNode, wxT("wxWizardPageSimple")) ||
|
||||
IsOfClass(parentNode, wxT("wxFrame")) ||
|
||||
IsOfClass(parentNode, wxT("wxDialog"))) &&
|
||||
parentNode->GetType() == wxXML_ELEMENT_NODE), NULL,
|
||||
(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_class == wxT("wxBoxSizer"))
|
||||
|
Reference in New Issue
Block a user