GObject: NULL virtual methods during instance init
- From: Gustavo J A M Carneiro <ee96090 fe up pt>
- To: gtk-devel-list gnome org
- Subject: GObject: NULL virtual methods during instance init
- Date: 10 Aug 2001 18:14:00 +0100
I'm getting something weird. I have class A and class B, where class B
is derived from class A. Class A defines a virtual method, "vfunc",
which is pure virtual and only implemented in class B.
I created an instance of class B. During class A's instance init func
(but called with a B object) I try to invoke vfunc this way:
AClass *class;
class = A_GET_CLASS(self);
if (class->vfunc)
class->vfunc(self, args);
But at this point class->vfunc is NULL. I do initialize it correctly at
class B's class_init function.
Generally, I've been using GObject with virtual methods for some time
and had no problem at all until now.
Am I doing anything wrong here? What?
Thanks in advance for any help.
--
Gustavo Joćo Alves Marques Carneiro <ee96090 fe up pt>
__ _
/__ _ _|_ _. _ / _. ._ ._ _ o ._ _
\_| |_| _> |_ (_| \/ (_) \_ (_| | | | (/_ | | (_)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]