From: Massimiliano Mirra Date: 2001-11-01T22:28:45+09:00 Subject: [ruby-talk:24078] Re: [ANN] JTTui 0.10.0 - textmode user interface On Thu, Nov 01, 2001 at 04:16:51AM +0900, Jakub Travnik wrote: > I would like to recieve some feedback. I didn't get any yet. This is just to let you know that someone (me) is getting acquainted with it and likes it A LOT. But I am a console junkie and I love whatever can be done on a tty far more than what can be done on X, so I might be biased. ;-) I have tried to define a button's block separately from the button itself, as stated in the starting-guide.txt, this way: btnTest=JTTWButton.new(main, 'Test Button', 3, 2, 11, 1, '_Test') btnTest.block = Proc { JTTui.beep } [this is in def createRoot(root)] I get this: my.rb:15:in `createRoot': undefined method `Proc' for # (NameError) from my.rb:21 from my.rb:21:in `run' from my.rb:21 All goes well when I define it inline: btnTest=JTTWButton.new(main, 'Test Button', 3, 2, 11, 1, '_Test') #{ JTTui.beep } I'd like to keep the tasks separated of defining the UI layout, binding actions to its elements, and starting it (that's why I wanted to define a block with the Proc way). The ``JTTui.run |root| do'' way, where all is done at once, looks too thick to me, not because it's bad itself, just because of my Delphi Object Pascal past. Can you suggest a skeleton to accomplish that separation? Thank you for JTTui, I've been waiting for something like that since I put my hands on Ruby. :-) Massimiliano