register fndamental object
- From: tom <tom dbservice com>
- To: gtk-devel-list gnome org
- Subject: register fndamental object
- Date: Sun, 29 Sep 2002 22:36:46 +0200
this doesnt work:
GType
shadow_get_type (void)
{
static GType type = 0;
GType next;
static const GTypeFundamentalInfo finfo =
{ G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE |
G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE };
if (!type)
{
static const GTypeInfo info = {
sizeof (shadowClass),
(GBaseInitFunc) shadow_base_init,
(GBaseFinalizeFunc) shadow_base_finalize,
(GClassInitFunc) shadow_class_init,
(GClassFinalizeFunc) shadow_class_finalize,
NULL,
sizeof (shadow),
0,
(GInstanceInitFunc) shadow_instance_init,
NULL
};
g_type_init ();
next = g_type_fundamental_next();
type = g_type_register_fundamental (next, "shadow", &info,
&finfo, G_TYPE_FLAG_ABSTRACT);
}
return type;
}
i get this:
bash-2.05a$
bash-2.05a$
bash-2.05a$ ./bin/client
creating shadow....
shadow_new
(process:13356): GLib-GObject-WARNING **: attempt to register
fundamental type `shadow' with invalid type id (49)
(process:13356): GLib-GObject-WARNING **: cannot create new instance of
invalid (non-instantiatable) type `<invalid>'
error while creating a shadow instance....
bash-2.05a$
whats wrong ?
please send me an email.. (tom dbservice com)
thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]