From: dmiller at gwi.net (David Miller)
Date: Tue, 04 May 1999 02:57:10 GMT
Subject: ORA Programming Python sample problem
Message-ID: <amtX2.235$Fq2.2969@newsfeed.slurp.net>
Content-Length: 1170
X-UID: 1900                                                 

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




