I am trying to subclass wx.html.HtmlWindow. I created a subclass
HTMLChat(wx.html.HtmlWindow) and added the subclass=”HTMLChat” as
well as tried subclass=”chat_client.HTMLChat” and when I load my
app, it says:
“subclass HTMLChat not found for resource htmChat, not
subclassing!”
class HTMLChat(wx.html.HtmlWindow):
def __init__(self, parent, ID, frame):
#wxHTML.HtmlWindow.__init__(self, parent, ID)
pre = wx.PreHtmlWindow()
self.PostCreate(pre)
def OnLinkClicked(self, link):
print link.Href
class MyApp(wx.App):
def OnInit(self):
self.res = xrc.XmlResource(GUI_FILE)
self.frame = self.res.LoadFrame(None, GUI_FRAME)
self.panel = xrc.XRCCTRL(self.frame, GUI_PANEL)
self.message = xrc.XRCCTRL(self.panel, GUI_MESSAGE)
self.html = xrc.XRCCTRL(self.panel, GUI_HTML)
self.send = xrc.XRCCTRL(self.panel, GUI_BTN_SEND)
self.frame.Show(1)
self.InitMenu()
return True
<?xml version="1.0"
encoding="cp1255"?>
<title>Forem Chat Client (alpha)</title>
<object class="wxPanel"
name=“pnlMain”>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxHtmlWindow"
name=“htmChat” subclass=“HTMLChat”>
<- snip ->
···
–
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.33/678 - Release Date: 2/9/2007 4:06 PM