[Tutor] re.Binding Events

ALAN GAULD alan.gauld at btinternet.com
Tue Feb 10 09:31:44 CET 2009



> I am mixing 2 examples given in "an-introduction-to- tkinter "
> by Fredrik Lundh.(and got this code)
> Today I got this error message
>

> Traceback (most recent call last):
>   File "<pyshell#5>", line 1, in <module>
>    xx=app(root,event)
> NameError: global name 'event' is not defined

Which tells you that event is not recognised.
Where do you define event?

Also look at your call to app()
It is different to both calls in the examples:


> Example1=
...
> app = App(root)

> Example2=
> root = Tk()
> root.mainloop()
Where does your "event" come from? What purpose is it 
supposed to serve?

Alan G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090210/9947c42e/attachment.htm>


More information about the Tutor mailing list