Andrea Zagli wrote: > i have GObject A and GObject B; B is a A's subclass > > obj_a = a_new (); > obj_b = b_new (); > > (a_new() and b_new() return GObject) > > when i call IS_OBJECT_A (obj_b) it returns TRUE: why? > > is it a bug? or is it normal? or am i mistaking something?
It is doing what it should. It is like dynamic_cast in C++ or instanceof in Java or isinstance in Python. Although type of obj_b is B, it is also an instance of A since B derives from A. Paul _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list