]> git.saurik.com Git - wxWidgets.git/commitdiff
Partially applied [ 632321 ] XRC object_ref fix
authorJulian Smart <julian@anthemion.co.uk>
Tue, 17 Dec 2002 22:52:48 +0000 (22:52 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 17 Dec 2002 22:52:48 +0000 (22:52 +0000)
1. Fix object_ref so it at least works, with this I mean
XRC was not even handling the little sample in
tn0014.txt correct.

Hans Van Leemputten (hansvl)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xrc/xmlres.cpp
docs/tech/tn0014.txt
src/xrc/xmlres.cpp

index b711c954407593abde26e41e868d0f03929bbe6a..22f6b0a69611c4fecf357a7e9533dfc36dcd17c4 100644 (file)
@@ -1109,7 +1109,7 @@ void wxXmlResourceHandler::CreateChildren(wxObject *parent, bool this_hnd_only)
     while (n)
     {
         if (n->GetType() == wxXML_ELEMENT_NODE &&
-            n->GetName() == wxT("object"))
+           (n->GetName() == wxT("object") || n->GetName() == wxT("object_ref")))
         {
             if (this_hnd_only && CanHandle(n))
                 CreateResource(n, parent, NULL);
index 21783d18120b3630d6949ab1bfc04a499b5cca3d..08a9cfaf4ce040d6da5d3b71e11c07af14209844 100644 (file)
@@ -120,7 +120,7 @@ Example:
     </object>
     <object_ref name="bar" ref="foo">
         <value>bar</value>               <!-- override! -->
-    </object>
+    </object_ref>
 
 is identical to:    
 
index b711c954407593abde26e41e868d0f03929bbe6a..22f6b0a69611c4fecf357a7e9533dfc36dcd17c4 100644 (file)
@@ -1109,7 +1109,7 @@ void wxXmlResourceHandler::CreateChildren(wxObject *parent, bool this_hnd_only)
     while (n)
     {
         if (n->GetType() == wxXML_ELEMENT_NODE &&
-            n->GetName() == wxT("object"))
+           (n->GetName() == wxT("object") || n->GetName() == wxT("object_ref")))
         {
             if (this_hnd_only && CanHandle(n))
                 CreateResource(n, parent, NULL);