ORA Programming Python sample problem

David Miller dmiller at gwi.net
Mon May 3 22:57:10 EDT 1999


I'm trying to run the demo code which came with the O'Reilly
Programming Python book.  Specifically the "formgui.py" program
in the dbase directory.

When I try the "next" button I get this error message on stdout:

Exception in Tkinter callback
Traceback (innermost last):
  File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 752, in __call__
    return apply(self.func, args)
  File "formgui.py", line 51, in onNext
    self.display()
  File "formgui.py", line 61, in display
    self.keytext(key)                       # change key in main box
AttributeError: no __call__ method defined


The "next" method given in the book and source sample, in its 
entirety is:

    def onNext(self):
        if self.cursor >= len(self.index)-1:             
            self.infobox('Advance', "End of table")
        else:
            self.cursor = self.cursor + 1
            self.display()


And at this point I'm lost:(  I'm assuming that this was valid
code under 1.3, the version used in the book, and that it's
no longer valid.  But I'd love to have someone tell me why:)

All hints, clues, comments welcome.  Python 1.5.1, FreeBSD 2.2.7R.


Thanks,

David Miller




More information about the Python-list mailing list