Hi John, same here: sorry for the delay.
On Sep 13, 2010, at 2:40, John Obbele wrote: > Anyway, forget about this, I have kept things simple and only > coded a minimal subset of GHashTable, re-reading xfconf > documentation, it appears we only get (gchar*) keys and (gvalue*) > values. > > Yes, that sounds better. If at all possible, you should not expose the user to GValues since these are too easy to get wrong (memory management, etc.). Please check what Duncan has done in gconf. I think he came up with a simple type class construction. > Then, concerning the question. I would like to cast > XfconfChannel to a GObject, play with its attribute and connect > to it some signals. If I've correctly understood the recent > cabalization of gtk2hs and its addons, and based on gconf-0.11, I > should hook Setup.hs to Gtk2HsSetup.hs, create two files, > "marshal.list" and "hierarchy.list" and modify the .cabal > configuration accordingly, am I right ? > Yes. You need marshal.list if you have callbacks, otherwise you don't have to bother. You probably need hierarchy.list since that is required if you want the tools to create new class definitions. > What if my reference to the XfconfChannel gobject is a "weak" > reference ? Is there some special things to do, since I do not > require a g_object_unref finalizer. At the moment, a Haskell handle to an object is a strong reference. If it goes out of scope, then the reference counter of that object is decremented. This scheme is a bit problematic since you can create space leaks by creating closures that include these object references and then attach these closures to callbacks from the same object. We have not yet figured out a way to circumvent this problem. The only way to get rid of an object is to explicitly destroy it. Hope this helps, Axel ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel