From be050baf4853dff316601189abf4234ce53c15a4 Mon Sep 17 00:00:00 2001
From: Robin Dunn <robin@alldunn.com>
Date: Thu, 6 Dec 2001 20:27:40 +0000
Subject: [PATCH] dllwidget demo updates

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 wxPython/demo/dllwidget/Makefile     |  7 ++-----
 wxPython/demo/dllwidget/test_dll.cpp |  2 +-
 wxPython/demo/dllwidget/test_prog.py | 18 ++++++++++--------
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/wxPython/demo/dllwidget/Makefile b/wxPython/demo/dllwidget/Makefile
index 71065ea605..bcf3a56412 100644
--- a/wxPython/demo/dllwidget/Makefile
+++ b/wxPython/demo/dllwidget/Makefile
@@ -4,10 +4,7 @@ CXXFLAGS = `wx-config --cxxflags` -fPIC -I.
 LDFLAGS = `wx-config --libs`
 
 
-all: test_prg test_dll.so
-
-test_prg: dllwidget.o test_prg.o
-	$(CXX) $(LDFLAGS) -o $@ dllwidget.o test_prg.o
+all: test_dll.so
 
 test_dll.so: test_dll.o
 	$(CXX) $(LDFLAGS) -shared -o $@ $<
@@ -16,4 +13,4 @@ test_dll.so: test_dll.o
 	$(CXX) -c $(CXXFLAGS) -o $@ $<
 
 clean:
-	rm -f *.o *.so test_prg
+	rm -f *.o *.so
diff --git a/wxPython/demo/dllwidget/test_dll.cpp b/wxPython/demo/dllwidget/test_dll.cpp
index 605d787a36..0c2d92e16f 100644
--- a/wxPython/demo/dllwidget/test_dll.cpp
+++ b/wxPython/demo/dllwidget/test_dll.cpp
@@ -3,7 +3,7 @@
 #include <wx/window.h>
 #include <wx/msgdlg.h>
 
-#include "../dllwidget.h"
+#include "../../contrib/dllwidget/dllwidget.h"
 
 class TestWindow : public wxWindow
 {
diff --git a/wxPython/demo/dllwidget/test_prog.py b/wxPython/demo/dllwidget/test_prog.py
index 42991bd8fc..660b158c41 100644
--- a/wxPython/demo/dllwidget/test_prog.py
+++ b/wxPython/demo/dllwidget/test_prog.py
@@ -36,14 +36,16 @@ class TestFrame(wxFrame):
                                    "TestWindow",
                                    size=(250, 150))
 
-        # The embedded window is the one exported from the DLL
-        print dw.GetEmbeddedWindow().GetClassName()
-
-        # This shows that we can give it a child from this side of things.
-        # You can also call any wxWindow methods on it too.
-        wxStaticText(dw.GetEmbeddedWindow(), -1,
-                     "Loaded from test_dll...", pos=(10,10))
-
+        if dw.Ok():
+            # The embedded window is the one exported from the DLL
+            print dw.GetEmbeddedWindow().GetClassName()
+
+            # This shows that we can give it a child from this side of things.
+            # You can also call any wxWindow methods on it too.
+            wxStaticText(dw.GetEmbeddedWindow(), -1,
+                         "Loaded from test_dll...", pos=(10,10))
+        else:
+            wxStaticText(dw, -1, "ERROR!!!!", pos=(20,20))
 
         sizer = wxBoxSizer(wxVERTICAL)
         sizer.Add(wxStaticLine(panel, -1), 0, wxGROW)
-- 
2.47.2