Re: 问一个关于wx.MessageBox的问 题。
limodou <[email protected]>
| Newsgroups | gmane.comp.python.chinese |
|---|---|
| Message-ID | <[email protected]> |
2008/1/17 maki <[email protected]>: > 我看书上有这么一段代码: > import wx > dlg = wx.MessageBox(None,'hello world!','hello',wx.YES_NO) > re = dlg.ShowModal() > dlg.Destroy() > ------- > 可我运行的时候,出现: > Traceback (most recent call last): > File "D:\MessageBox.py", line 2, in <module> > dlg = wx.MessageBox(None,'hello world!','hello',wx.YES_NO) > File "D:\Python25\Lib\site-packages\wx- 2.8-msw-unicode\wx\_misc.py", line > 493, in MessageBox > return _misc_.MessageBox(*args, **kwargs) > TypeError: String or Unicode type required > > 请问下这是为什么。谢谢 > 参数不对,它第一个不是parent参数,所以第一个不能是None。建议看文档。 -- I like python! UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/ meide <<wxPython UI module>>: http://code.google.com/p/meide/ My Blog: http://www.donews.net/limodou _______________________________________________ python-chinese Post: send [email protected] Subscribe: send subscribe to [email protected] Unsubscribe: send unsubscribe to [email protected] Detail Info: http://python.cn/mailman/listinfo/python-chinese