Gregory Millam wrote:
> My own idea was having it closer to this:
> 
> button {
>   label "name"
>   on_click { ... }
>   (right click, mouseover, etc can be set here too)
> }
> 
> With a shortcut:
> 
> button_onclick "name" {
>   ...
> }
> 
> The big question we should be asking ourselves here - which one follows the POLS? ;).

Heh, whose? :)

My way was this...

Short constructor:

   b1 = button "Label" { do_this_when_clicked }

Adding more stuff:

   b1.setup do
     (right click, mouseover, etc can be set here too)
   end

The principle to me is: Make the most commonly occurring case the
easiest and shortest, but keep the other stuff possible.

BTW, I normally prefer do/end for multiple lines and {} for single
lines. But that's just me. Same difference.


Hal