From 9f01cb2918790cb28f3ca799d885e8a22ad1c2ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 3 Dec 2003 14:32:51 +0000 Subject: [PATCH 1/1] unknown controls container can't be subclassed, assert if somebody tries it (as does DialogsBlock) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xrc/xh_unkwn.cpp | 3 +++ src/xrc/xh_unkwn.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/contrib/src/xrc/xh_unkwn.cpp b/contrib/src/xrc/xh_unkwn.cpp index 4ff1733125..cad645b68b 100644 --- a/contrib/src/xrc/xh_unkwn.cpp +++ b/contrib/src/xrc/xh_unkwn.cpp @@ -90,6 +90,9 @@ wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler() wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() { + wxASSERT_MSG( m_instance == NULL, + _T("'unknown' controls can't be subclassed, use wxXmlResource::AttachUnknownControl") ); + wxPanel *panel = new wxUnknownControlContainer(m_parentAsWindow, GetName(), -1, diff --git a/src/xrc/xh_unkwn.cpp b/src/xrc/xh_unkwn.cpp index 4ff1733125..cad645b68b 100644 --- a/src/xrc/xh_unkwn.cpp +++ b/src/xrc/xh_unkwn.cpp @@ -90,6 +90,9 @@ wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler() wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() { + wxASSERT_MSG( m_instance == NULL, + _T("'unknown' controls can't be subclassed, use wxXmlResource::AttachUnknownControl") ); + wxPanel *panel = new wxUnknownControlContainer(m_parentAsWindow, GetName(), -1, -- 2.45.2