From: Charles Comstock Date: 2004-04-07T21:49:36+09:00 Subject: Re: Idea: Simplified GTK Chad Fowler wrote: [...] > I know you lose some flexibility (or you make it one level harder), but > I can't help wanting it to look like this: > > def app_logic > main { > hbox { > vbox { > button("Do it") { puts "pressed btn1" } > button("This too") { puts "pressed btn2" } > } > vbox { > button("Third button") { puts "pressed btn3" } > } > } > } > end > Just cause you yield the instance to the block, doesn't mean you can't return the instance as well, so you don't HAVE to lose the object. Charles Comstock