[Glade-users] Fwd: Failing to display a custom fake property



On Wed, Feb 5, 2014 at 12:26 AM, Alejandro T. Colombini
<atcolombini at gmail.com> wrote:
Hi,
  I'm writing a catalog containing an object with a fake property similar
to, but much simpler than, the Data property of the GtkTreeModel
implementations, GtkTreeStore and GtkListStore, in the Gtk+ catalog.

  I've managed to create the editor for it and read/write the property from
a glade XML file using the GladeWidgetAdaptor methods, it also loads as
expected from the GtkBuildable. The problem comes when I set the property's
value in Glade. The value type of the fake property is GtkListStore, which
is convenient as I use it directly to set it as the model of the GtkTreeView
shown in the editor. When the values are set or changed in the GtkTreeView
they don't display,

You say this is a fake property in the previous paragraph, and then go on to
say that when you set it's value "they don't display".

Please try to describe the problem more accurately, what you are doing is
complex and difficult, I'm not surprised it didnt work on the first
shot and would
be happy to clarify what's going on - but I don't understand exactly what you
are doing and what is going on.

but the number of rows is right, and editing them again
and placing some debug messages in the code shows the values are also right,
and they are even written/read to/from file correctly when the project is
saved/loaded.

  I don't know where the problem actually is or if it has something to do
with this but when I call glade_command_set_property to set the value of the
property, Glade complains displaying the following critical warnings (when I
set the property to NULL only the second message is displayed):

(glade:9234): GladeUI-CRITICAL **: Object type property refers to an object
outside the project
(glade:9234): GladeUI-CRITICAL **: glade_property_update_prop_refs:
assertion `gnew != NULL' failed

  I've tried writing a GladeWidgetAdaptorSetPropertyFunc for the object but
it's not called for its custom properties. So I don't know how to solve this
one, does anyone have any clues about it? Maybe it's just a silly error I've
made, but as I don't see it and this warning is showing, any help is
welcome.

The GladeWidgetAdaptorSetPropertyFunc is used to apply an actual value
of a property to a runtime object in the workspace - if this is indeed a fake
property, you probably have it set to ignore="True" in the catalog, in which
case Glade will not try to apply any value to any object.

Also in which case you would not expect anything to update in the workspace,
since it's a fake property you don't expect any visual feedback for it.

Try letting us know exactly what you are trying to accomplish and maybe we
can help more.

Cheers,
    -Tristan



  Thanks.


_______________________________________________
Glade-users maillist  -  Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users





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