A few other projects have the line with ‘Ncurses::mousemask…’ in
them - but it’s always commented out… like they couldn’t get it
working either.
Is this feature not functional?
I’ve currently got ‘Ncurses::mousemask(Ncurses::ALL_MOUSE_EVENTS,[])’
and the error ‘wrong number of arguments (2 for 1)’ and as soon as I
drop the second arg I get the error ‘oldmask (2nd argument) must be an
empty Array’ which is kinda bothersome…
A few other projects have the line with ‘Ncurses::mousemask…’ in
them - but it’s always commented out… like they couldn’t get it
working either.
They couldn’t
Is this feature not functional?
It’s a bug in the method definition; see below.
I’ve currently got ‘Ncurses::mousemask(Ncurses::ALL_MOUSE_EVENTS,[])’
and the error ‘wrong number of arguments (2 for 1)’ and as soon as I
drop the second arg I get the error ‘oldmask (2nd argument) must be an
empty Array’ which is kinda bothersome…
It’s a bug in the library. It’s been there forever (I came across it
when I was trying to add mouse support to Raggle, then just forgot to
send a patch upstream).
Thanks for the reply, but I think I’m going to move away from
ncurses… you can’t get CTRL- to be unique can you? I haven’t
found anywhere in the docs where it allows you to detect the CTRL key
on it’s own.
That’s a terminal-dependent feature. If the terminal supports it,
one can write a terminfo that describes it (as a function-key).
(n)curses supports up to 60 function keys (which you would probably
find too limiting
Thanks for the reply, but I think I’m going to move away from
ncurses… you can’t get CTRL- to be unique can you? I haven’t
found anywhere in the docs where it allows you to detect the CTRL key
on it’s own.
If you can’t, then that’s the straw that breaks it.
Again - thanks for the reply.
-Rich
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.