]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/wxpTag.py
wxCheckListBox doesn't require wxUSE_OWNER_DRAWN when using WXUNIVERSAL
[wxWidgets.git] / wxPython / wx / lib / wxpTag.py
index d93a9fa9b10792117cb811c7471da57f6dfa255f..5de374e9901b52bb7433bf408f823681ce709da3 100644 (file)
@@ -169,7 +169,8 @@ class wxpTagHandler(wx.html.HtmlWinTagHandler):
             obj.Show(True)
 
             # add it to the HtmlWindow
-            self.GetParser().GetContainer().InsertCell(wx.html.HtmlWidgetCell(obj, self.ctx.floatWidth))
+            self.GetParser().GetContainer().InsertCell(
+                wx.html.HtmlWidgetCell(obj, self.ctx.floatWidth))
             self.ctx = None
 
         return True
@@ -195,7 +196,7 @@ class wxpTagHandler(wx.html.HtmlWinTagHandler):
 
 
         # check for something that should be evaluated
-        elif value[0] in '[{(' or value[:2] == 'wx':
+        elif value and value[0] in '[{(' or value[:2] == 'wx':
             saveVal = value
             try:
                 value = eval(value, self.ctx.classMod.__dict__)
@@ -203,7 +204,7 @@ class wxpTagHandler(wx.html.HtmlWinTagHandler):
                 value = saveVal
 
         # convert to wx.Colour
-        elif value[0] == '#':
+        elif value and value[0] == '#':
             try:
                 red   = int('0x'+value[1:3], 16)
                 green = int('0x'+value[3:5], 16)
@@ -212,7 +213,8 @@ class wxpTagHandler(wx.html.HtmlWinTagHandler):
             except:
                 pass
 
-        self.ctx.kwargs[str(name)] = value
+        if self.ctx:
+          self.ctx.kwargs[str(name)] = value
         return False