problems with new class
- From: "Oskar Liljeblad" <osk hem passagen se>
- To: <gtk-list redhat com>
- Subject: problems with new class
- Date: Sat, 25 Jul 1998 01:43:37 +0200
I've written a new class, whose parent is GtkObject. Whenever I try to
create a new instance of it with the myobject_new function, I get this
error:
** WARNING **: invalid unclassed pointer in cast to `MyObject`
(Other errors follows, such as 'invalid class type `(unknown)` in cast to
`GtkObject`.) The object has been successfully allocated a unique type with
gtk_type_unique(gtk_object_get_type(), ...), the class initialized and the
object itself initialized. It fails when MYOBJECT() is issued:
MyObject *myobject_new(void)
{
return MYOBJECT(gtk_type_new(myobject_get_type()));
}
MYOBJECT() is defined as
#define MYOBJECT(obj) (GTK_CHECK_CAST ((obj), myobject_get_type(),
MyObject))
I've copied almost all code from other classes - and no warnings or errors
are reported during compiling. It's possible I've missed something, though.
I'm running GTK+ 1.0.4.
Oskar Liljeblad (osk@hem.passagen.se)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]