gutopia-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[rgui-dev] Generic widget actions and Mixins


From: Massimiliano Mirra
Subject: [rgui-dev] Generic widget actions and Mixins
Date: Sat, 28 Sep 2002 16:33:43 +0200
User-agent: Mutt/1.3.28i

First of all, be sure to check [ruby-talk:51458] about GUIS and widget
servers, if you haven't yet.

Second, I was playing with Enumerable recently and started wondering.

The really neat thing about Enumerable is that you provide your class
with a way of doing something very generic (#each, that is iterating
over the members of a collection), then you mix in the Enumerable
module and it provides all the sugar (collect, find, find_all,
reject...).

What I was wondering about is whether, for a certain kind of widget,
there were one simple and very generic action, in terms of which most
of the others could be expressed.  That way one could just implement
Gtk::List#very_generic_thing, Tk::List#very_generic_thing,
Qt::List#very_generic_thing, and then mix Listable (?) to each of
them.

However, I can't yet wrap my mind around what these `basic operations'
might be (assuming they exist).  I'll give this some more thought and
will post whatever I come up with.  Meanwhile I just wanted to share
the idea.


Massimiliano




reply via email to

[Prev in Thread] Current Thread [Next in Thread]