]> git.saurik.com Git - wxWidgets.git/commitdiff
unknown controls container can't be subclassed, assert if somebody tries it (as does...
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 3 Dec 2003 14:32:51 +0000 (14:32 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 3 Dec 2003 14:32:51 +0000 (14:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xrc/xh_unkwn.cpp
src/xrc/xh_unkwn.cpp

index 4ff17331255d181695cea5bc0578729e75407e07..cad645b68b10634d0332f95642f8602ffc75c978 100644 (file)
@@ -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,
index 4ff17331255d181695cea5bc0578729e75407e07..cad645b68b10634d0332f95642f8602ffc75c978 100644 (file)
@@ -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,