# Switching off 'abstract class'-switch in Gtk::Container

**URL:** <https://www.ruby-forum.com/t/switching-off-abstract-class-switch-in-gtk-container/86967>\
**Category:** Ruby-Gnome 2\
**Created:** [February 27, 2007, 7:23am UTC](https://www.ruby-forum.com/t/switching-off-abstract-class-switch-in-gtk-container/86967 "2007-02-27T07:23:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Nordholts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@Martin\_Nordholts](https://www.ruby-forum.com/u/Martin_Nordholts)\
**Post date:** [February 27, 2007, 7:23am UTC](https://www.ruby-forum.com/t/switching-off-abstract-class-switch-in-gtk-container/86967/1 "2007-02-27T07:23:01Z")

</div>

Hello,

I am implementing a custom ToolBox-container that is based on the code  
from the Glade interface designer.

class ToolBox \< Gtk::Container  
# …  
end

When I try to instantiate the class however, I get an ‘abstract class  
(TypeError)’ error. Obviously this ‘abstract class’-flag is internal to  
GTK+ since abstract classes are not part of the Ruby-language.

So my question is, how do I properly switch this ‘abstract class’ flag  
off in my ToolBox? Could this be a bug so that the best thing to do is  
to try finding it in Ruby-GNOME2?

- Martin Nordholts

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys-and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)

---

<div class="post-metadata">

**Author:** ![Martin\_Nordholts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@Martin\_Nordholts](https://www.ruby-forum.com/u/Martin_Nordholts)\
**Post date:** [February 27, 2007, 7:07pm UTC](https://www.ruby-forum.com/t/switching-off-abstract-class-switch-in-gtk-container/86967/2 "2007-02-27T19:07:52Z")

</div>

On Tue, Feb 27, 2007 at 07:22:14AM +0100, Martin Nordholts wrote:

> class ToolBox \< Gtk::Container  
> # …  
> end
> 
> When I try to instantiate the class however, I get an ‘abstract class  
> (TypeError)’ error. Obviously this ‘abstract class’-flag is internal to  
> GTK+ since abstract classes are not part of the Ruby-language.

Do you have a call to type\_register in your class definition?

Cheers,  
Markus

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys-and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)

---

<div class="post-metadata">

**Author:** ![Martin\_Nordholts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@Martin\_Nordholts](https://www.ruby-forum.com/u/Martin_Nordholts)\
**Post date:** [February 27, 2007, 9:17pm UTC](https://www.ruby-forum.com/t/switching-off-abstract-class-switch-in-gtk-container/86967/3 "2007-02-27T21:17:31Z")

</div>

Aha

Thanks, that fixed that problem.

- Martin

tis 2007-02-27 klockan 19:06 +0100 skrev Markus K.:

> ruby-gnome2-devel-en mailing list  
> removed\_email\_address@domain.invalid  
> [ruby-gnome2-devel-en List Signup and Options](https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en)

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys-and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)
