Re: SpinButtpn gets the old value - is this a GtkSpinButton bug?



In message <15094 63754 596427 573089 beluga mojam com>, skip pobox com writes:

>The appended Python script creates a GtkSpinButton and a GtkButton (I'm
>using Gtk 1.3.4 at the moment - haven't had a chance to upgrade to 1.3.5).
>If you run the script, click with the mouse in the SpinButton after the "1",
>delete it, then focus out of the SpinButton (moving the mouse or using TAB),
>the on_change callback gets the wrong value the first time, still printing
>"1200" instead of "200".  If you hit TAB twice more, focusing back into the
>SpinButton then out again, you get the correct value.  In fact, it seems the
>widget is always one change behind when a focus out event occurs if you use
>the mouse and keyboard to change the widget's value.  If you use the
>spinners to change the value the correct value is displayed on focus out.

>Seems like a bug in GtkSpinButton to me, but since I'm still pretty new to
>Gtk programming I wanted to run it by the list before filing a bugzilla
>report to make sure I wasn't missing something.

gtk 1.2.x also seems to have this bug.  I think the workaround I used was to
parse the contents of the underlying GtkEntry widget and convert that into a
number.

John

-- 
John GOTTS <jgotts linuxsavvy com>  http://linuxsavvy.com/staff/jgotts




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]