From: Yasushi Shoji Date: 2000-12-13T17:16:53+09:00 Subject: [ruby-talk:7136] Re: Level of Gtk/Ruby OO (was: Gtk widget color) At Wed, 13 Dec 2000 03:08:46 +0900, Kevin Smith wrote: > > > > It seems to me like Ruby/GTK is a not-very-OO wrapper around GTK. I > >> had hoped it would be more like GTK--, which is a C++ OO wrapper > >> that seems pretty nice. > > > >It'd be nice to hear how those two bindings differ in OO point of > >view. > > Keep in mind that this is based on a 10 minute look at Ruby/GTK. It > seems like Ruby/GTK ends up sending something like > 'caller.event(widget)', where GTK-- would send 'widget.event'. So in > Ruby/GTK I would have to catch the event, and then figure out who it > was aimed at, unlike GTK--. I could be wrong. I might be wrong, but in Gtk+ world, 'event' is something that your window system send to your application. We have Gtk::Widget#event but that just maps gtk_widget_event. and this method takes event, not a target widget. (btw, gtk_widget_event is marked as "INTERNAL FUNCTION") could you give me some example? > I wonder how hard it would be to create Ruby/GTK--? I certainly don't use Gtk-- and don't follow Gtk-- development, but why do you want to add yet another layer? if those events and signaling system are what make Gtk-- more OO than Ruby/Gtk, lets create better signaling system for Ruby/Gtk ;) # assuming libsigc++ is heavily depending C++ features regards, -- yashi