In Tkinter - having an input and an entry
Fredrik Lundh
fredrik at pythonware.com
Sat Apr 5 10:12:11 EDT 2008
markfernandes02 at googlemail.com wrote:
> Thanks it sorted out my 'StringVar' problem.
> I now have another problem...
>
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "D:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
> return self.func(*args)
> TypeError: Insert() takes at least 1 argument (0 given)
>
> Code below
>
> def Insert(self, *row):
> global cursor, title, author, pubdate, accessDatabase
> sqlInsert = "INSERT INTO Book_table (Bookname, BookAutor,
> Publicationdate) VALUES('title + ',' author + ',' pubdate)"
...
is Insert a function or a method (that is, a function defined inside a
class)? who's calling Insert? what is "self" supposed to be?
to sort out Python's function call mechanisms, try reading the following
chapters:
http://www.ibiblio.org/swaroopch/byteofpython/read/functions.html
http://docs.python.org/tut/node6.html#SECTION006600000000000000000
</F>
More information about the Python-list
mailing list