> Anyway, I've got a number of programs which suddenly stopped working. > I think due to a change from python 2.6 to 2.7. > > I was setting up a menu call back to a Class with code like: > > Button(bf, text=txt, height=1, command=cmd).grid(column=c, row=0, pady=5) > > when 'cmd' was a simple class name. Doesn't work anymore :) > > However, if I change cmd to a lambda it's find.
I got some help over in comp.python on this. Apparently there was a change between 2.6 and 2.7. There are 3 easy solutions: 1. Use a function :) 2. Use lambda. 3. Use a new style class, ie: class mywindow(object) I've tried all three and they all work. I'm not sure what the best method is. Best to all. -- **** Listen to my CD at http://www.mellowood.ca/music/cedars **** Bob van der Poel ** Wynndel, British Columbia, CANADA ** EMAIL: b...@mellowood.ca WWW: http://www.mellowood.ca _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss