Non-built-in GTK_TYPE as argument type?

From: Christopher Lee <chlee_at_MIT.EDU>
Date: 26 Apr 2001 11:44:19 -0400

[please cc: me since I'm not on this list - Thanks!]

Hi --

I'm using gob and also the GtkObject-system for the first time, and I'm
trying to use them to write a system for representing OpenGL drawings as
trees of GtkObjects. I want the objects to be able to save themselves
to and load themselves from an XML file, and I'm doing this by having
member functions in the parent class scan through the objects arguments
and saving/loading them according to the argument type. Because
floating-point vectors are a common type data-type I need to deal with,
I wrote a XD:Vec GtkObject (XD stands for xml-draw), and would like to
use this as an argument for objects such as GL:DrawObj:Line.

My problem is that gob doesn't seem to want to let me do this because
XD:Vec is an 'unknown Gtk+ type'. Is there a way to use a non built-in
GtkType as an argument in gob? It seems it should be possible to do it
in the GtkObject system in general (but I've never tried it myself).
I'd just use GtkObject as the type of argument and do a cast to XD:Vec
in the settter-function, but then I lose information about what kind of
object is expected when I load the argument from the XML file.

ps. I'm using gob 1.0.7

pps. I tried to build my own object system and preprocessor once, and
got totally bogged down (e.g., it had a built-in real-time garbage
collector....). I'm really happy to see someone else has done such an
excellent job!

Christopher Lee <>
(617) 253-5095 <>
Postdoctoral Associate of Mechanical Engineering
Field and Space Robotics Laboratory
Massachusetts Institute of Technology
77 Massachusetts Ave, Room 3-472m
Cambridge, MA 02139
Received on Thu Apr 26 2001 - 11:55:30 CDT

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT