[Glade-users] cannot register existing type
- From: azagli at libero.it (Andrea Zagli)
- Subject: [Glade-users] cannot register existing type
- Date: Thu, 30 Jan 2014 12:10:59 +0000
Il giorno mer 29 gen 2014 18:01:07 CET, Tristan Van Berkom ha scritto:
On Wed, Jan 29, 2014 at 7:34 PM, Andrea Zagli <azagli at libero.it> wrote:
i have 2 custom widgets: GtkMaskedEntry and GtkDateEntry
GtkDateEntry is a GtkBin with inside GtkMaskedEntry
i created catalogs and pixmaps to use them with glade (version 3.14.3); but
when i try to insert widget GtkDateEntry inside a container (ex. GtkBox) i
got the error
GLib-GObject-WARNING **: cannot register existing type `GtkMaskedEntry'
(glade.exe:5052): GLib-CRITICAL **: g_once_init_leave: assertion `result !=
0' failed
(glade.exe:5052): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed
and glade crash (if i insert GtkMaskedEntry it works)
in glade 3.8.x they works perfectly
what could be the problem?
Does one derive from the other ?
no
as i said GtkDateEntry is derived from GtkBin with GtkHBox as child;
inside the GtkHBox there are a GtkMaskedEntry (derived from GtkEntry)
and others widgets
If it does, the parent class should be defined before the child class inside
the catalog.
How is the catalog defined ? Are you linking to the module/library containing
these widgets or are you faking the type using the "parent" xml attribute of
the <glade-widget-class> tag ?
If you can send us the catalog we could make a better guess at what's going
wrong here.
attached
Also, a little besides the point: NEVER define custom widgets that are called
GtkAnything, 'Gtk' is reserved for the GTK+ namespace, so as soon as GTK+
decides to go ahead and declare a GtkDateEntry of its own, your code breaks.
Call it PonyDateEntry, assuming your widget library or application is
called Pony.
yes i know :-(
thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtkmaskedentry.xml
Type: application/xml
Size: 644 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/glade-users/attachments/20140130/0019bfa9/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtkdateentry.xml
Type: application/xml
Size: 1027 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/glade-users/attachments/20140130/0019bfa9/attachment-0001.xml>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]