What topic is necessary for gtk4 tutorials for beginners?

GObject has not really changed since Mr. Krause wrote his book. Latest changes where from around 2005, when the toggle_references where introduced.

The book of A. Krause was OK, it helped me start with GTK in 2006/2007. You may know there is a GTK3 Python clone available of that book.

But I have really no idea what you intent. Do you try to replace Mr Bassi? Well that will take you many thousand hours at least. Do you intend to work on the GTK lib, create and extend widgets? I think then you have to learn a lot indeed. But if you only wants to create applications then it is not that much work. And of course for app development one can use other languages than C. Not only Nim :slight_smile:

1 Like

Well, I think that the book is good and I don’t regret the purchase. My problem with the “up to date” is, that when you jump between the book and any GObject code, the macros are different.
Later I found out, that the macros in the book are now just created by “higher order” macros -> macros creating the macros desribed in the book. All of this was very confusing for me.

I do not intent to replace anyone :slight_smile:

My suggestions (in the original post) really originates in my belief, that the ability to subclass widget and create our own is a basic ability - no matter the widget library. That’s why I suggested a lecture about GLib/GObject should be part of any “begginer tour” which is teaching the Gtk in C.

It looks like you have more than decade of experience with the GLib/GObject. I don’t and I might not be aware of all the things you do. I started with the GObject a year ago and this thread cought my attention. If you think that my suggestions are not on topic, I apologize. I do not have any ambitions to create something like this myslef because I lack the required education on the topic.

From my point of view as a person who is trying to get familiar with the Gtk/GLib/GObject in the C language, this is a significant challange, in my opinion worth addressing. :slight_smile:

1 Like

Ah yes. All these macros where a big issue for me for the Nim bindings. For my first attempt five years ago I created the Nim bindings from the C headers and tried to transfer some C macros to Nim. Really not easy. One help can be to let gcc expand the macros, I think there was a -E option to do that.

It looks like you have more than decade of experience with the GLib/GObject.

Yes, I started in 2006 with a bit C and more Ruby. But compared to Mr. Bassi I still know nothing about all the GTK internals.

2 Likes

Hi, Mikokas.

You gave me a great advice. GObject is a very important topic for beginners. I wrote it in Section 7, 10 and 11 of my tutorial. However, to explain GObject is tough work and I’m afraid the tutorial is not easy enough for beginners.

Originally, C doesn’t have any object oriented featurs. GObject add it to C as a library. So, if the beginner doesn’t know about object oriented programing, they won’t understand it at all. Such beginners are strongly recommended to learn object oriented languages such as Java, C++ or some other languages first.

If you read the sections above and give me a feedback, it’s really helpful for me. You can write issues of the github of my tutorial.

Thank you.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.