[pygtk] gtk.Entry possible bug

Andrea Caminiti a.caminiti at yahoo.com
Tue May 13 00:08:54 WST 2008


Hi everyone:

i'm developing a calculator that would be used on win-all. last friday i decided 
to make a clean installation for python, pygtk, etc.. so i can make a howto 
for the installation.

i downloaded the must recent version of each program:

python-2.5.2.msi
pygtk-2.12.1-2.win32-py2.5.exe
pycairo-1.4.12-1.win32-py2.5.exe
pygobject-2.14.1-1.win32-py2.5.exe
gtk-dev-2.12.9-win32-2.exe

before making this clean reinstallation, my software was working good. but after
the update i got a lot of problems, errors and warnings with a gtk.Entry

----------------------------------------------------------------------------------------------------------------
    def callback(self, widget, entry, type):
        if entry != None:
            raw_integer = eval(entry.get_text())
        else:
            pass
        dict[type] = raw_integer
        print dict
----------------------------------------------------------------------------------------------------------------

one of the several warning was:

GtkWarning: gtk_entry_get_text: assertion `GTK_IS_ENTRY (entry)'

so i tried new code suggested here:
----------------------------------------------------------------------------------------------------------------
    def callback(self, widget, entry, type):
        print 'widget is entry', widget is entry
        entry_text = entry.get_chars(0, -1)
        print "Entry contents: %s\n" % entry_text
----------------------------------------------------------------------------------------------------------------

got a new warning:

GtkWarning: gtk_editable_get_chars: assertion `GTK_IS_EDITABLE (
editable)' failed

so i tried to reinstall the previous version of pygtk which is:

pygtk-2.12.1-1.win32-py2.5.exe

and the program worked again with using the first code. i was going to fill
a bug on gnome's bugzilla but before doing it. can someone please reproduce
(maybe on linux) this bug so i can have confirmation of it before reporting it?

thanks!

nrayever


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



More information about the pygtk mailing list