From 076c29d8f7f182ce8a0be3d334745b08af2fdc5e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 10 Feb 2007 00:14:56 +0000 Subject: [PATCH] Check for NotImplementedError git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/GraphicsContext.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wxPython/demo/GraphicsContext.py b/wxPython/demo/GraphicsContext.py index bc2d3039eb..99510b0605 100644 --- a/wxPython/demo/GraphicsContext.py +++ b/wxPython/demo/GraphicsContext.py @@ -19,7 +19,13 @@ class TestPanel(wx.Panel): def OnPaint(self, evt): dc = wx.PaintDC(self) - gc = wx.GraphicsContext.Create(dc) + try: + gc = wx.GraphicsContext.Create(dc) + except NotImplementedError: + dc.DrawText("This build of wxPython does not support the wx.GraphicsContext " + "family of classes.", + 25, 25) + return font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT) font.SetWeight(wx.BOLD)