Prev: bug in TkComm::list?
Next: Ruby 1.9.1-p129
From: LAMBEAU Bernard on 14 Jul 2010 18:40 [Note: parts of this message were removed to make it a legal post.] Hi all, I'm experimenting a small problem when trying to use HighLine with wrap_at/page_at options... The script below leads to a deadlock under MacOS with all ruby installations I have (rvm) <pre> require 'rubygems' require 'highline' h = HighLine.new h.wrap_at = 10 h.say "a"*100 </pre> Something I don't understand ?? thanks, B
From: James Edward Gray II on 14 Jul 2010 23:38 On Jul 14, 2010, at 5:40 PM, LAMBEAU Bernard wrote: > I'm experimenting a small problem when trying to use HighLine with > wrap_at/page_at options... The script below leads to a deadlock under MacOS > with all ruby installations I have (rvm) > > <pre> > require 'rubygems' > require 'highline' > h = HighLine.new > h.wrap_at = 10 > h.say "a"*100 > </pre> > > Something I don't understand ?? Nope, it looks like you found a bug. I believe I have it fixed on Github now: http://github.com/JEG2/highline Can you confirm that code works for you? Thanks. James Edward Gray II
From: LAMBEAU Bernard on 15 Jul 2010 02:31 [Note: parts of this message were removed to make it a legal post.] Works perfectly now :-) P.S. Don't know it's a bug, but with page_at set to :auto, two lines are hidden on each page (probably due to the "\n-- press enter/return to continue or q to stop -- q" message). Don't know if it's clear, ... you can try the following: <pre> require 'rubygems' require 'highline' h = HighLine.new h.page_at = :auto h.say((1..1000).collect{|i| i.to_s}.join("\n")) </pre> On a terminal 80x24, the first page starts shows 3 to 24, the second page 27 to 48, and so on. Anyway, using "h.page_at = h.output_rows-2" works fine... Thanks a lot, B On Thu, Jul 15, 2010 at 5:38 AM, James Edward Gray II <james(a)graysoftinc.com > wrote: > On Jul 14, 2010, at 5:40 PM, LAMBEAU Bernard wrote: > > > I'm experimenting a small problem when trying to use HighLine with > > wrap_at/page_at options... The script below leads to a deadlock under > MacOS > > with all ruby installations I have (rvm) > > > > <pre> > > require 'rubygems' > > require 'highline' > > h = HighLine.new > > h.wrap_at = 10 > > h.say "a"*100 > > </pre> > > > > Something I don't understand ?? > > Nope, it looks like you found a bug. I believe I have it fixed on Github > now: > > http://github.com/JEG2/highline > > Can you confirm that code works for you? > > Thanks. > > James Edward Gray II >
From: James Edward Gray II on 15 Jul 2010 10:27 On Jul 15, 2010, at 1:31 AM, LAMBEAU Bernard wrote: > P.S. Don't know it's a bug, but with page_at set to :auto, two lines are > hidden on each page (probably due to the "\n-- press enter/return to > continue or q to stop -- q" message). Don't know if it's clear, ... you can try the following: > > <pre> > require 'rubygems' > require 'highline' > h = HighLine.new > h.page_at = :auto > h.say((1..1000).collect{|i| i.to_s}.join("\n")) > </pre> > > On a terminal 80x24, the first page starts shows 3 to 24, the second page 27 > to 48, and so on. Looks like a bug to me, yep. > Anyway, using "h.page_at = h.output_rows-2" works fine... I applied your fix: http://github.com/JEG2/highline Thanks again! James Edward Gray II
From: LAMBEAU Bernard on 15 Jul 2010 16:07 [Note: parts of this message were removed to make it a legal post.] Works fine ! Thanks again B On Thu, Jul 15, 2010 at 4:27 PM, James Edward Gray II <james(a)graysoftinc.com > wrote: > On Jul 15, 2010, at 1:31 AM, LAMBEAU Bernard wrote: > > > P.S. Don't know it's a bug, but with page_at set to :auto, two lines are > > hidden on each page (probably due to the "\n-- press enter/return to > > continue or q to stop -- q" message). Don't know if it's clear, ... you > can try the following: > > > > <pre> > > require 'rubygems' > > require 'highline' > > h = HighLine.new > > h.page_at = :auto > > h.say((1..1000).collect{|i| i.to_s}.join("\n")) > > </pre> > > > > On a terminal 80x24, the first page starts shows 3 to 24, the second page > 27 > > to 48, and so on. > > Looks like a bug to me, yep. > > > Anyway, using "h.page_at = h.output_rows-2" works fine... > > I applied your fix: > > http://github.com/JEG2/highline > > Thanks again! > > James Edward Gray II >
|
Pages: 1 Prev: bug in TkComm::list? Next: Ruby 1.9.1-p129 |