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

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’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

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’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

Aha

Thanks, that fixed that problem.

  • Martin

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

ruby-gnome2-devel-en mailing list
[email protected]
ruby-gnome2-devel-en List Signup and Options


Take Surveys. Earn Cash. Influence the Future of IT
Join 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