Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: Dan Falcone <danfalcone@gmail.com>
To: William Morgan <wmorgan-sup@masanjin.net>
Cc: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] curses exception
Date: Mon, 22 Feb 2010 10:41:46 -0500	[thread overview]
Message-ID: <ed5557341002220741x3e1a9556v921083093c40a3b7@mail.gmail.com> (raw)
In-Reply-To: <ed5557341001151149g34460038ub7a8a445409da034@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2473 bytes --]

Just checking on this...

On Fri, Jan 15, 2010 at 2:49 PM, Dan Falcone <danfalcone@gmail.com> wrote:

> Hi William,
>
> Sorry I didn't get back to you sooner.  I finally got back around to
> playing with this again.  Here are the answers to your questions:
>
> >gem list --local | grep curse
> ncurses (0.9.1)
>
> The test script prints:
> true
>
> The ncurses examples all seem to work and display color.  I did have to
> edit them to add require 'rubygems' at the top.
>
> I also tried playing with the sup code a bit.  If I comment out lines 133-4
> in lib/sup/colormap.rb:
>
> #      Curses.init_pair id, fg, bg or raise ArgumentError,
> #       "couldn't initialize curses color pair #{fg}, #{bg} (key #{id})"
>
> sup loads, but everything is in black and white and a bit difficult to
> read.  I also tried uncommenting that, then changing Curses to Ncurses so it
> looks like this:
>
>       Nurses.init_pair id, fg, bg or raise ArgumentError,
>        "couldn't initialize curses color pair #{fg}, #{bg} (key #{id})"
>
> sup loads with that as well, and displays some color, but most of the
> screen is unreadable (I'm guessing it's displaying as white text on white
> background).
>
> Any ideas?  I tried changing more things from Curses to Ncurses, but that
> quickly started generating method undefined errors.
>
> Thanks!
> Dan
>
>
>
> On Thu, Oct 15, 2009 at 11:27 AM, William Morgan <wmorgan-sup@masanjin.net
> > wrote:
>
>> Reformatted excerpts from Dan Falcone's message of 2009-10-15:
>> > Hmm... good question.  I regularly use emacs with colors enabled, but
>> > I'm not sure if that uses curses.  I tried typespeed and that seemed
>> > to work.  According to its man page, it uses curses.
>>
>> Hm. What version of the ncurses gem do you have? (gem list --local
>> should tell you.)
>>
>> What does this program print?
>>
>>  require 'rubygems'
>>  require 'ncurses'
>>
>>  x = begin
>>    Ncurses::initscr();
>>    Ncurses::has_colors?()
>>  ensure
>>    Ncurses::endwin();
>>  end
>>
>>  puts x
>>
>> If it prints true, then, if you look in the contents of the gem
>> (wherever that is on your system), there should be an examples/
>> directory. If you run examples/tlock.rb or examples/rain.rb, (probably
>> with ruby -rubygems), do you see color?
>> --
>> William <wmorgan-sup@masanjin.net>
>> _______________________________________________
>> sup-talk mailing list
>> sup-talk@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/sup-talk
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 3584 bytes --]

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

      reply	other threads:[~2010-02-22 15:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 22:33 Dan Falcone
2009-10-06 23:45 ` Dan Falcone
2009-10-11 20:30 ` William Morgan
2009-10-12 14:09   ` Dan Falcone
2009-10-15 12:51     ` William Morgan
2009-10-15 14:40       ` Dan Falcone
2009-10-15 15:27         ` William Morgan
2010-01-15 19:49           ` Dan Falcone
2010-02-22 15:41             ` Dan Falcone [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed5557341002220741x3e1a9556v921083093c40a3b7@mail.gmail.com \
    --to=danfalcone@gmail.com \
    --cc=sup-talk@rubyforge.org \
    --cc=wmorgan-sup@masanjin.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox