[Tutor] GUI new project

Luke Paireepinart rabidpoobear at gmail.com
Mon Oct 23 05:04:59 CEST 2006


Joe Cox wrote:
> As a new guy, I was trying to write a simple unit conversion
> program in Tk. I got this error message:TclError: unknown option "-command"
>
>
>   
>>>> Traceback (most recent call last):
>>>>         
>   File
> "D:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
> line 310, in RunScript
>     exec codeObject in __main__.__dict__
>   File "D:\Python24\Convert it\Tk Grid demo2py.py", line 70, in ?
>     main()
>   File "D:\Python24\Convert it\Tk Grid demo2py.py", line 67, in main
>     Application().mainloop()
>   File "D:\Python24\Convert it\Tk Grid demo2py.py", line 22, in __init__
>     , relief=SUNKEN)
>   File "D:\Python24\lib\lib-tk\Tkinter.py", line 2409, in __init__
>     Widget.__init__(self, master, 'listbox', cnf, kw)
>   File "D:\Python24\lib\lib-tk\Tkinter.py", line 1862, in __init__
>     self.tk.call(
> TclError: unknown option "-command"
>
> Any Ideas?
>       
>       self.lbSites = Listbox(self,command=self.reveal, exportselection=0
>                                  , relief=SUNKEN)
>   
Acually I think it was this line that was causing trouble first :)
Same reason, though.
Cheers,
-Luke


More information about the Tutor mailing list