Phoenix - richtext

Hi Robin,

On these two:
         self._xmlHandler = wx.richtext.RichTextXMLHandler()
         self._htmlHandler = wx.richtext.RichTextHTMLHandler()

I am seeing this exception:

TypeError: wx._richtext.RichTextXMLHandler represents a C++ abstract class and cannot be instantiated
File "c:\dev\dabo\dabo\ui\uiwx\dRichTextBox.py", line 623, in <module>
   app.start()
File "c:\dev\dabo\dabo\dApp.py", line 401, in start
   self.uiApp.start()
File "c:\dev\dabo\dabo\ui\uiwx\uiApp.py", line 463, in start
   self.MainLoop()
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw\wx\core.py", line 1873, in MainLoop
   rv = wx.PyApp.MainLoop(self)
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw\wx\core.py", line 2880, in <lambda>
   lambda event: event.callable(*event.args, **event.kw) )
File "c:\dev\dabo\dabo\ui\uiwx\dPemMixin.py", line 350, in _afterInitAll
   self.afterInitAll()
File "c:\dev\dabo\dabo\ui\uiwx\dRichTextBox.py", line 475, in afterInitAll
   self.textControl = dRichTextBox(self)
File "c:\dev\dabo\dabo\ui\uiwx\dRichTextBox.py", line 32, in __init__
   self._xmlHandler = wx.richtext.RichTextXMLHandler()

Is that something you need to fix or does one have to adapt ones code?

Werner

Werner wrote:

Hi Robin,

On these two:
self._xmlHandler = wx.richtext.RichTextXMLHandler()
self._htmlHandler = wx.richtext.RichTextHTMLHandler()

I am seeing this exception:

TypeError: wx._richtext.RichTextXMLHandler represents a C++ abstract
class and cannot be instantiated
File "c:\dev\dabo\dabo\ui\uiwx\dRichTextBox.py", line 623, in <module>
app.start()
File "c:\dev\dabo\dabo\dApp.py", line 401, in start
self.uiApp.start()
File "c:\dev\dabo\dabo\ui\uiwx\uiApp.py", line 463, in start
self.MainLoop()
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw\wx\core.py", line 1873,
in MainLoop
rv = wx.PyApp.MainLoop(self)
File "c:\Python27\Lib\site-packages\wx-3.0.0-msw\wx\core.py", line 2880,
in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "c:\dev\dabo\dabo\ui\uiwx\dPemMixin.py", line 350, in _afterInitAll
self.afterInitAll()
File "c:\dev\dabo\dabo\ui\uiwx\dRichTextBox.py", line 475, in afterInitAll
self.textControl = dRichTextBox(self)
File "c:\dev\dabo\dabo\ui\uiwx\dRichTextBox.py", line 32, in __init__
self._xmlHandler = wx.richtext.RichTextXMLHandler()

Is that something you need to fix or does one have to adapt ones code?

Something I need to fix. The implementation of the richtext classes and their unittests is only about half done.

···

--
Robin Dunn
Software Craftsman