From: Chad Fowler Date: 2004-04-08T01:14:24+09:00 Subject: Re: Idea: Simplified GTK On Wed, 7 Apr 2004, Charles Comstock wrote: # 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 # I didn't think I had to lose the object. I didn't want it. (I assume you're talking about maintaining a variable reference to the widget instances?) Chad