From: Gregory Millam Date: 2004-04-08T04:25:07+09:00 Subject: Re: Idea: Simplified GTK Received: Thu, 8 Apr 2004 04:15:06 +0900 And lo, Asim wrote: > Since the only thing that can happen to a button is that someone > clicks it it might be more concise to leave the onclick out. > Something like: > > button "name" { > ... > } > > BTW, this is a great line of thinking. I have often craved a more > ruby-esque GUI API. This could finally make GUI programming fun. Yeah - button "Quit" { Gtk.main_quit } was the original example I used. As Phil suggests, we would split the block actions dependent on container / not container, and most common. button "name" { # this is executed on "clicked" Gtk.main_quit } container { # this is executed immediately, for adding items to the container" } 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? ;). - Greg Millam