Re: Bug inside GtkBuilder w/ GtkAdjustment



Thank you so much. I solved editing the .xml by hand!

On Sun, Feb 28, 2010 at 9:53 PM, Tadej BorovÅak <tadeboro gmail com> wrote:
Hello

Today working with glade, I noticed a strange behaviour while working
with GtkAdjustment.

import gtk

str_gui = """
<?xml version="1.0"?>
<interface>
Â<requires lib="gtk+" version="2.16"/>
Â<!-- interface-naming-policy project-wide -->
Â<object class="GtkAdjustment" id="foo">
 Â<property name="value">10</property>
 Â<property name="lower">1</property>
 Â<property name="upper">100</property>
 Â<property name="step_increment">1</property>
Â</object>
</interface>
"""

builder = gtk.Builder()
builder.add_from_string(str_gui)
print builder.get_object('foo').get_value()

The output is 0.0 and not 10 as espected. Is this something already known?

This is a known problem and I think it is already fixed in git master.
Basically, I boils down to the fact that properties need to be
specified in right order for GtkBuilder to work properly. See this bug
report for more info:
https://bugzilla.gnome.org/show_bug.cgi?id=594372

Tadej

--
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com




-- 
Matteo Landi
http://www.matteolandi.net/



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