Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] Exception on start up
@ 2007-11-29  1:49 Alex Gutteridge
  2007-11-29  4:17 ` Christopher Warrington
  2007-11-29 15:15 ` Grant Hollingworth
  0 siblings, 2 replies; 5+ messages in thread
From: Alex Gutteridge @ 2007-11-29  1:49 UTC (permalink / raw)


> This was thrown on OSX 10.5.1. Running iTerm 0.9.5.
>
> --- ArgumentError from thread: main
> couldn't initialize curses color pair 4, 0 (key 1)
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/colormap.rb:88:in  
> `color_for'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/colormap.rb:112:in `send'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/colormap.rb:112:in  
> `method_missing'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:104:in `write'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/scroll-mode.rb: 
> 49:in `draw'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/scroll-mode.rb: 
> 47:in `each'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/scroll-mode.rb: 
> 47:in `draw'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/line-cursor- 
> mode.rb:24:in `draw'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:95:in `draw'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:283:in  
> `draw_screen'
> /Library/Ruby/Gems/1.8/gems/sup-0.3/bin/sup:172
> /usr/bin/sup:19:in `load'
> /usr/bin/sup:19

All the ncurses examples run, but not in color, so there's clearly  
something going wrong with OSX or my terminal. Curses wont initialize  
any color pair, so it's seems to be a problem with curses on OSX not  
sup.

irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'curses'
=> true
irb(main):003:0> require 'ncurses'
=> true
irb(main):004:0> Curses.init_pair 1, -1, -1
=> false
irb(main):005:0> Curses.init_pair 1, Curses::COLOR_WHITE,  
Curses::COLOR_BLACK
=> false

Alex Gutteridge

Bioinformatics Center
Kyoto University




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [sup-talk] Exception on start up
  2007-11-29  1:49 [sup-talk] Exception on start up Alex Gutteridge
@ 2007-11-29  4:17 ` Christopher Warrington
  2007-11-29 15:15 ` Grant Hollingworth
  1 sibling, 0 replies; 5+ messages in thread
From: Christopher Warrington @ 2007-11-29  4:17 UTC (permalink / raw)


Excerpts from Alex Gutteridge's message of Wed Nov 28 19:49:34 -0600 2007:
> All the ncurses examples run, but not in color, so there's clearly  
> something going wrong with OSX or my terminal. Curses wont initialize  
> any color pair, so it's seems to be a problem with curses on OSX not  
> sup.

If I remember correctly, the Apple Terminal program identified itself as
"xterm-color". This has caused me problems in the past. Changing it to
simply "xterm" has fixed it for me with no loss of functionality.

-- 
Christopher Warrington <chrisw at rice.edu>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [sup-talk] Exception on start up
  2007-11-29  1:49 [sup-talk] Exception on start up Alex Gutteridge
  2007-11-29  4:17 ` Christopher Warrington
@ 2007-11-29 15:15 ` Grant Hollingworth
  1 sibling, 0 replies; 5+ messages in thread
From: Grant Hollingworth @ 2007-11-29 15:15 UTC (permalink / raw)


Excerpts from Alex Gutteridge's message of Wed Nov 28 20:49:34 -0500 2007:
> All the ncurses examples run, but not in color, so there's clearly  
> something going wrong with OSX or my terminal. Curses wont initialize  
> any color pair, so it's seems to be a problem with curses on OSX not  
> sup.
> 
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> require 'curses'
> => true
> irb(main):003:0> require 'ncurses'
> => true
> irb(main):004:0> Curses.init_pair 1, -1, -1
> => false
> irb(main):005:0> Curses.init_pair 1, Curses::COLOR_WHITE,  
> Curses::COLOR_BLACK
> => false

Sup works for me, in colour, in Terminal.app. $TERM is set to xterm-color. I'm using ncurses 5.6 from MacPorts.

I get the same results as you in irb. Does curses normally work there?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [sup-talk] Exception on start up
  2007-11-28  9:17 Alex Gutteridge
@ 2007-11-28 17:27 ` William Morgan
  0 siblings, 0 replies; 5+ messages in thread
From: William Morgan @ 2007-11-28 17:27 UTC (permalink / raw)


Excerpts from Alex Gutteridge's message of Wed Nov 28 01:17:11 -0800 2007:
> This was thrown on OSX 10.5.1. Running iTerm 0.9.5.
> 
> --- ArgumentError from thread: main
> couldn't initialize curses color pair 4, 0 (key 1)

This suggests that ncurses doesn't want to work. Not knowing too much
about MacOS, are you missing some ncurses libraries?  Have you installed
the ncurses ruby gem? Are you able to run any other ncurses apps from
that terminal? (For example, the ncurses gem comes with a couple example
.rb files. Do they work?)

-- 
William <wmorgan-sup at masanjin.net>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [sup-talk] Exception on start up
@ 2007-11-28  9:17 Alex Gutteridge
  2007-11-28 17:27 ` William Morgan
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Gutteridge @ 2007-11-28  9:17 UTC (permalink / raw)


This was thrown on OSX 10.5.1. Running iTerm 0.9.5.

--- ArgumentError from thread: main
couldn't initialize curses color pair 4, 0 (key 1)
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/colormap.rb:88:in  
`color_for'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/colormap.rb:112:in `send'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/colormap.rb:112:in  
`method_missing'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:104:in `write'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/scroll-mode.rb:49:in  
`draw'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/scroll-mode.rb:47:in  
`each'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/scroll-mode.rb:47:in  
`draw'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/line-cursor-mode.rb: 
24:in `draw'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:95:in `draw'
/Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:283:in  
`draw_screen'
/Library/Ruby/Gems/1.8/gems/sup-0.3/bin/sup:172
/usr/bin/sup:19:in `load'
/usr/bin/sup:19

Alex Gutteridge

Bioinformatics Center
Kyoto University




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-11-29 15:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-29  1:49 [sup-talk] Exception on start up Alex Gutteridge
2007-11-29  4:17 ` Christopher Warrington
2007-11-29 15:15 ` Grant Hollingworth
  -- strict thread matches above, loose matches on Subject: below --
2007-11-28  9:17 Alex Gutteridge
2007-11-28 17:27 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox