[Lablgtk-list] taking the full OO approach

Jacques Garrigue garrigue at math.nagoya-u.ac.jp
Wed Mar 30 02:20:01 CEST 2011


On 2011/03/30, at 0:50, Philippe Strauss wrote:

> Hello lablgtk users,
> 
> How do I write lablgtk code to be able to reuse some assembly of widgets multiple times in my app, until now I've used a lot the functional closure between class and object keyword to express my GUI and pack it, but it only works fine at the toplevel or if you use this class only once in your whole app.

You may have look at the IRC client in applications/camlirc of the lablgtk source distribution.
It tries to do things in a reasonably modular way.
To allow repacking components, one just adds a ?packing argument, which is forwarded
to the most external container inside your component.
To allow communication between components, you can use the ML signal framework
provided by GUtil.ml_signal.

Jacques Garrigue


More information about the Lablgtk-list mailing list