From: Jakub Travnik Date: 2001-11-02T04:38:48+09:00 Subject: [ruby-talk:24105] Re: [ANN] JTTui 0.10.0 - textmode user interface Massimiliano Mirra wrote: > On Thu, Nov 01, 2001 at 04:16:51AM +0900, Jakub Travnik wrote: > 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 } As the others noted, solution is to replace 'Proc' with 'proc' or 'Proc.new'. I have corrected that error in starting-guide.txt (next release will include it fixed). > 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? I have Delphi background too. I'm not sure if I understand what you want. Show me example of the way you want to code. > Thank you for JTTui, I've been waiting for something like that since I > put my hands on Ruby. :-) I have not been waiting becouse I have started to code this just after I learnt ruby. Learning took me one weekend (Jul 13-14) and first parts of JTTui including working JTTWindow were written within a week (I have them archived). I have got familiar with Ruby very quicky because I already wanted to write such (object oriented from base unlike java) language. Ruby is very good for this kind of project. (I learned python before Ruby but I dropped it, I dislike __that__(self) __funny__(self) __stuff__(self)) Ruby proved to be good for project big like this (~5400 lines, ~140KB of *.rb + C extension). However I cannot know how good it is for team work. Jakub Travnik ICQ: 66770334