[Glade-users] liststore with GObjects



I ran your program in gdb.

The bug is in GTK+, specifically gtk_builder_value_from_string_type()
returns false without
setting an error, this causes gtkliststore.c:list_store_text() to
crash a few lines later.

It seems the current implementation of
gtk_builder_value_from_string_type() doesnt
know how to lookup objects by reference (only to build pixbufs), and
that the object
referencing is done in subclasses or implicitly when the type is reffered to by
a property (in gtkbuilder.c properties are handled with special care
and references
are resolved in the parse finish state).

Sigh, I suppose bugs should be filed... maybe it would be better to just
bring this up on gtk-devel-list...


On Thu, Aug 20, 2009 at 12:51 PM, Alexey
Kurochkin<alexey.kurochkin at pathfinderlwd.com> wrote:
On Thu, 2009-08-20 at 12:04 -0400, Tristan Van Berkom wrote:
On Thu, Aug 20, 2009 at 11:54 AM, Alexey
Kurochkin<alexey.kurochkin at pathfinderlwd.com> wrote:
[...]
Yes, note that GObjects in the liststore are be passed by
reference (i.e. the value of an object column is the id/name
of the referred object in the file... the same object can show
up in multiple rows and columns...).

If you mean replacing <col id="0" /> which Glade generates for GObject
column with something like this:

<col id="0">adjustment1</col>

then it does not work. It segfaults... :(


Does it ? try manually placing the adjustment definition /before/ the
liststore definition.

As a liststore can refer to many different types I doubt its a good
policy to force all
reffered objects to be before the liststore, so, if the above formula
successfully
works around the segfault, I would call it a bug in GTK+ (that the
liststore does
not wait for the "finished" signal to resolve referred objects by id).

Nope, the same result. If you care to look, attached is a simple test.

By the way, I have gtk+2.14.5 source here and do not see liststore
implementing anything called "finished", only custom_tag_start and
custom_tag_end.





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