On 2006-04-25, Farshid Lashkari <[EMAIL PROTECTED]> wrote: > Schüle Daniel wrote: >> I don't understand what is the difference between commented lines >> 1 and 2 >> >> with 1 uncommented and 2 commented it works as expected >> with 1 commented and 2 uncommented the picture doesn't appear > > > I'm not familiar with Tkinter, but it seems as thought with 2, the > "image" variable is garbage collected after the constructor of Main is > called. With 1, you save a reference to the image, so it does not get > garbage collected.
Yes. That's exactly correct. It's sort of a FAQ. See the highlighted note at the bottom of http://effbot.org/tkinterbook/bitmapimage.htm -- Grant Edwards grante Yow! LOU GRANT froze at my ASSETS!! visi.com -- http://mail.python.org/mailman/listinfo/python-list