From: David King Landrith Date: 2003-04-01T00:59:22+09:00 Subject: Re: Hard coded newline characters On Monday, March 31, 2003, at 10:27 AM, ts wrote: > or perhaps > > at_exit { endwin } This is exactly the type of elegant solution that I'm looking for. Unfortunately, this behaves exactly the same as trap 0, proc { endwin }. (What is the difference between at_exit and trap 0?) On Monday, March 31, 2003, at 10:15 AM, Julian Snitow wrote: >>> Interesting but I doubt its necessarity and worthfulness. >> Likewise with your reply. > Ouch. > I'm sure antagonizing people will *really* make them want to help > you... Fair enough. I didn't intend to be antagonistic, but rather to answer a flip response in kind. This mailing list is sometimes frustrating because of the preponderance of know-it-all types offering solutions that (a) imply you know nothing about the Ruby and (b) --here's the rub-- don't even work. >> I am going to be gradually introducing ncurses based terminal >> capabilities to series of large and quite complex programs that are >> entirely readline/puts/printf based, and re-writing the UI layer all >> at once from the top isn't a viable alternative. Thus, the change >> will be gradual, and the initial inclusion of ncurses must not >> require modification of the existing code. > And what is so hard about having a stub file that contains > > begin > load 'real-main-program-file.rb' > rescue > # ... > ensure > endwin > end > > If that doesn't work, you could continue insulting people until they > spontaneously decide to change their code just for you... (most likely > by using \n wherever possible) :P Clever, but I must decline to answer your question about "what makes it some hard," because its entirely beside the point. The issue isn't whether it's so hard. I would prefer to use some kind of trap if its available. My question is whether something like this is, in fact, available? If not, then a simple "NO" will do. ------------------------------------------------------- David King Landrith (w) 617.227.4469x213 (h) 617.696.7133 One useless man is a disgrace, two are called a law firm, and three or more become a congress -- John Adams ------------------------------------------------------- public key available upon request