After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658766 - GObject lacks accessible introduction
GObject lacks accessible introduction
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: docs
2.29.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-09-11 21:50 UTC by Sodhi, Cedric
Modified: 2018-05-24 13:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sodhi, Cedric 2011-09-11 21:50:05 UTC
I hope this doesn't sound like too much of a rant, though it probably is, as so far I have no means of providing actual constructive suggestions. I'm hitting a wall with the introduction to Gobject which I blame mostly on the fact, that the documentation tries to explain the general concepts without actually going deep enough to be applicable. It's like trying to learn science based upon popular science literature: At the end of the day you can lengthly explain what it's all about but you still really have no clue how to do it.

I think a good start would be if the code snippets would, at least at parts, not only be snippets but actually working, nonetheless minimal examples (forgoing the boilerplate parts like includes, if you like).

In particular I struggle with understanding what I as a user have to do and what the GType system does for me.

In particular, one single, but very precise and elaborate description of the chain of events would be particularly helpful. I appreciate the tables at the end of most of the introductory sections, but they are again very general and, standing alone, do not help putting the concepts to use. Something like

User calls g_type_create_instance( Desired GType ) => GType System looks up memory required and allocates it => GType System calls XYZ (is XYZ a user defined function or part of GType?) ... etc

would greatly help. It poses a great problem that even at the pointer where the GObject as an example for what uses GObject is introduced, I have not the slightest clue how I would create a simple GObject, what the initialisation functions which I specify in GTypeInfo have to do, who allocates the memory where, when and how, and what exactly I have to provide for GType so I get a created object.
Comment 1 mennucc1 2014-07-25 14:24:18 UTC
hi,

there is a tutorial, at
https://developer.gnome.org/gobject/2.30/pt02.html

but admittedly it is difficult to write a functioning code even by looking at the tutorial (some of the snippets are not even valid C code...)

A guy has then rewritten all pieces together into working C code
http://arbingersys.blogspot.it/2009/07/missing-gobject-tutorial-sample.html

It would be quite useful if those files may become part of the official tutorial...

a.
Comment 2 GNOME Infrastructure Team 2018-05-24 13:20:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/447.