<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Subclassing in Ruby/GTK+</title>
	<atom:link href="http://micke.hallendal.net/blog/subclassing-in-rubygtk/feed/" rel="self" type="application/rss+xml" />
	<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/</link>
	<description>Personal blog of Mikael Hallendal</description>
	<pubDate>Thu, 28 Aug 2008 14:32:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Up North &#187; Type registering your own widgets in Ruby/GTK+</title>
		<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/#comment-2305</link>
		<dc:creator>Up North &#187; Type registering your own widgets in Ruby/GTK+</dc:creator>
		<pubDate>Wed, 16 Apr 2008 18:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://micke.hallendal.net/blog/2008/02/07/subclassing-in-rubygtk/#comment-2305</guid>
		<description>[...] my previous example, I passed the arguments like usual to the super call. It turns out that when you have registered [...]</description>
		<content:encoded><![CDATA[<p>[...] my previous example, I passed the arguments like usual to the super call. It turns out that when you have registered [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David B.</title>
		<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/#comment-1277</link>
		<dc:creator>David B.</dc:creator>
		<pubDate>Mon, 11 Feb 2008 19:01:03 +0000</pubDate>
		<guid isPermaLink="false">http://micke.hallendal.net/blog/2008/02/07/subclassing-in-rubygtk/#comment-1277</guid>
		<description>I think the difficulty of subclassing (and things in general, but subclassing is the biggest problem) is a huge barrier in GTK+ development. I've often wanted to contribute and work on existing GTK+ apps and such, but those are written largely in C. There are problems in a few apps that would be easily solved with a subclass, but the difficulty is a problem.

That one could replace the entire GObject tutorial (which doesn't even mention subclassing, from what I can see) with a few paragraphs in C++ or Ruby or  seems somewhat silly.

In comparison, as a potential GNOME contributor who has started hacking on KDE4 instead, the cleanness and niceness of CMake, Qt, KDE's libraries, etc. make working on it a pleasure. It takes me very little time to find the relevant code for a desired change in a KDE program, even if the relevant bit is in some other library four super-classes away. For someone who doesn't know the code, trying to help out on a GTK project is daunting.

I don't know what can be done, since existing apps are already in C, and I'm not sure how one could make subclasses work nicely in C... maybe a comprehensive set of *official* macros covering everything would help.

Anyway, it would be nice a lot if GTK hacking were made easier for mere mortals. I suspect I'm not the only one turned away by GObject.</description>
		<content:encoded><![CDATA[<p>I think the difficulty of subclassing (and things in general, but subclassing is the biggest problem) is a huge barrier in GTK+ development. I&#8217;ve often wanted to contribute and work on existing GTK+ apps and such, but those are written largely in C. There are problems in a few apps that would be easily solved with a subclass, but the difficulty is a problem.</p>
<p>That one could replace the entire GObject tutorial (which doesn&#8217;t even mention subclassing, from what I can see) with a few paragraphs in C++ or Ruby or  seems somewhat silly.</p>
<p>In comparison, as a potential GNOME contributor who has started hacking on KDE4 instead, the cleanness and niceness of CMake, Qt, KDE&#8217;s libraries, etc. make working on it a pleasure. It takes me very little time to find the relevant code for a desired change in a KDE program, even if the relevant bit is in some other library four super-classes away. For someone who doesn&#8217;t know the code, trying to help out on a GTK project is daunting.</p>
<p>I don&#8217;t know what can be done, since existing apps are already in C, and I&#8217;m not sure how one could make subclasses work nicely in C&#8230; maybe a comprehensive set of *official* macros covering everything would help.</p>
<p>Anyway, it would be nice a lot if GTK hacking were made easier for mere mortals. I suspect I&#8217;m not the only one turned away by GObject.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikael Hallendal</title>
		<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/#comment-1276</link>
		<dc:creator>Mikael Hallendal</dc:creator>
		<pubDate>Mon, 11 Feb 2008 16:44:33 +0000</pubDate>
		<guid isPermaLink="false">http://micke.hallendal.net/blog/2008/02/07/subclassing-in-rubygtk/#comment-1276</guid>
		<description>Arc posted a follow up about how to do this in Vala for those that are interested,

http://aruiz.typepad.com/siliconisland/2008/02/subclassing-in.html</description>
		<content:encoded><![CDATA[<p>Arc posted a follow up about how to do this in Vala for those that are interested,</p>
<p><a href="http://aruiz.typepad.com/siliconisland/2008/02/subclassing-in.html" rel="nofollow">http://aruiz.typepad.com/siliconisland/2008/02/subclassing-in.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: martin</title>
		<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/#comment-1270</link>
		<dc:creator>martin</dc:creator>
		<pubDate>Fri, 08 Feb 2008 16:10:50 +0000</pubDate>
		<guid isPermaLink="false">http://micke.hallendal.net/blog/2008/02/07/subclassing-in-rubygtk/#comment-1270</guid>
		<description>For the "don't want to depend on a runtime" people vala might be a good way too. I'm sure it can easyly subclass gobjects too.</description>
		<content:encoded><![CDATA[<p>For the &#8220;don&#8217;t want to depend on a runtime&#8221; people vala might be a good way too. I&#8217;m sure it can easyly subclass gobjects too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikael Hallendal</title>
		<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/#comment-1269</link>
		<dc:creator>Mikael Hallendal</dc:creator>
		<pubDate>Fri, 08 Feb 2008 09:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://micke.hallendal.net/blog/2008/02/07/subclassing-in-rubygtk/#comment-1269</guid>
		<description>Well, you can, however it seems there is a bug in the bindings somewhere causing the "super" operator to fail if you do.

The way to do it is:
&lt;pre name="code" class="ruby"&gt;class MyButton &lt; Gtk::Button
  type_register

  def signal_do_clicked 
    # Do something on click
  end
end&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Well, you can, however it seems there is a bug in the bindings somewhere causing the &#8220;super&#8221; operator to fail if you do.</p>
<p>The way to do it is:</p>
<pre name="code" class="ruby">class MyButton < Gtk::Button
  type_register

  def signal_do_clicked
    # Do something on click
  end
end</pre>
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: MDK</title>
		<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/#comment-1268</link>
		<dc:creator>MDK</dc:creator>
		<pubDate>Fri, 08 Feb 2008 09:31:43 +0000</pubDate>
		<guid isPermaLink="false">http://micke.hallendal.net/blog/2008/02/07/subclassing-in-rubygtk/#comment-1268</guid>
		<description>One (IMHO) problem with gtk on ruby is that you can directly override methods representing signal handlers. That makes subclassing in ruby a little bit less nice than it could be. For example, in C# I would write something like:

&lt;pre name="code" class="csharp"&gt;public class MyButton : Button {

    protected override void OnClicked ()
    {
        // Do something on click!
    }

}&lt;/pre&gt;

In ruby-gtk you can't subclass like this.</description>
		<content:encoded><![CDATA[<p>One (IMHO) problem with gtk on ruby is that you can directly override methods representing signal handlers. That makes subclassing in ruby a little bit less nice than it could be. For example, in C# I would write something like:</p>
<pre name="code" class="csharp">public class MyButton : Button {

    protected override void OnClicked ()
    {
        // Do something on click!
    }

}</pre>
<p>In ruby-gtk you can&#8217;t subclass like this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikael Hallendal</title>
		<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/#comment-1263</link>
		<dc:creator>Mikael Hallendal</dc:creator>
		<pubDate>Thu, 07 Feb 2008 23:27:51 +0000</pubDate>
		<guid isPermaLink="false">http://micke.hallendal.net/blog/2008/02/07/subclassing-in-rubygtk/#comment-1263</guid>
		<description>Johannes, excellent point. Updated the post.</description>
		<content:encoded><![CDATA[<p>Johannes, excellent point. Updated the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes</title>
		<link>http://micke.hallendal.net/blog/subclassing-in-rubygtk/#comment-1262</link>
		<dc:creator>Johannes</dc:creator>
		<pubDate>Thu, 07 Feb 2008 23:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://micke.hallendal.net/blog/2008/02/07/subclassing-in-rubygtk/#comment-1262</guid>
		<description>Just to mention it: Anjuta also has a code generator for subclassing in C for Glib/Gtk+.</description>
		<content:encoded><![CDATA[<p>Just to mention it: Anjuta also has a code generator for subclassing in C for Glib/Gtk+.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
