- 论坛徽章:
- 4
|
def OnButton(self, evt):
dlg = wx.FileDialog(
self, message="Choose a file",
defaultDir=os.getcwd(),
defaultFile="",
wildcard="",
style=wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR
)
if dlg.ShowModal() == wx.ID_OK:
paths = dlg.GetPaths()
self.cfile.SetValue(paths)
为什么self.cfile.SetValue(paths)执行这条语句就报以下错误
Traceback (most recent call last):
File "D:\lvxz\TALLYTOIFCSUM\src\TallyToIfcsum.py", line 113, in OnButton
self.cfile.SetValue(paths)
File "D:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py", line 1709, in SetValue
return _controls_.TextCtrl_SetValue(*args, **kwargs)
TypeError: String or Unicode type required
谢指点,谢谢
paths 返回的是个序列paths [0]
[ 本帖最后由 lvxinzhi 于 2008-8-19 11:57 编辑 ] |
|