about harmonia

Kristian kjkilpi at gmail.com
Sat Oct 7 02:28:42 PDT 2006

On Sat, 07 Oct 2006 04:38:39 +0300, Hasan Aljudy <hasan.aljudy at gmail.com>  
> ns wrote:
>> The harmonia wiki does not seem to have much content.
>>  http://harmonia.terrainformatica.com/pmwiki.php/Harmonia
> oh btw, this is the project's home page, it still has contents.
> http://harmonia.terrainformatica.com/

Looks promising. :) I like very much the sinking/bubbling event  
dispatching. IMHO, that's the correct order to deliver event messages.  
E.g. when the mouse is clicked, the topmost widget (the application  
object, actually) will get the event message first, and finally the  
bottommost widget.

For instance, Qt sends the event message directly to the bottommost  
widget. If you like to catch the message, then you have to create an event  
handler and install it for the widget. Not good.

However, sinking/bubbling does not make signals/slots needless.  
Sinking/bubbling is great when building 'solid constructs', e.g. windows  
(internal messaging). Signals/slots are great when linking widgets to your  
functions and other widgets (external messaging).

For example, there is a container C. Inside it are widgets A and B. When  
the user presses the right mouse button inside the container C, a context  
menu should open. Sinking/bubbling makes this easy to implement: just  
catch the event before A or B gets it. Now, when the user presses left  
mouse button over the widget A, a function X should be called.  
Signals/slots make things breeze here: simply connect the 'pressed()'  
signal (or something similar) to the function X.

More information about the Digitalmars-d-dwt mailing list