--7lMq7vMTJT4tNk0a
Content-Type: multipart/mixed; boundary="7cm2iqirTL37Ot+N"
Content-Disposition: inline
--7cm2iqirTL37Ot+N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
I've tried... and I've looked around.
=20
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).
Apply this patch (also attached):
diff -ur ncurses-ruby-0.9.2/ncurses_wrap.c ncurses-ruby-0.9.2-mousemask/ncu=
rses_wrap.c
--- ncurses-ruby-0.9.2/ncurses_wrap.c 2005-12-12 16:33:00.000000000 -0500
+++ ncurses-ruby-0.9.2-mousemask/ncurses_wrap.c 2005-02-26 19:22:13.0000000=
00 -0500
@@ -2387,7 +2387,7 @@
NCFUNC(ungetmouse, 1);
#endif
#ifdef HAVE_MOUSEMASK
- NCFUNC(mousemask, 2);
+ NCFUNC(mousemask, 1);
#endif
#ifdef HAVE_WENCLOSE
rb_define_module_function(mNcurses, "wenclose?",
--=20
Paul Duncan <
[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562
--7cm2iqirTL37Ot+N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ncurses-ruby-0.9.2-mousemask_fix.diff"
diff -ur ncurses-ruby-0.9.2/ncurses_wrap.c ncurses-ruby-0.9.2-mousemask/ncurses_wrap.c
--- ncurses-ruby-0.9.2/ncurses_wrap.c 2005-12-12 16:33:00.000000000 -0500
+++ ncurses-ruby-0.9.2-mousemask/ncurses_wrap.c 2005-02-26 19:22:13.000000000 -0500
@@ -2387,7 +2387,7 @@
NCFUNC(ungetmouse, 1);
#endif
#ifdef HAVE_MOUSEMASK
- NCFUNC(mousemask, 2);
+ NCFUNC(mousemask, 1);
#endif
#ifdef HAVE_WENCLOSE
rb_define_module_function(mNcurses, "wenclose?",
--7cm2iqirTL37Ot+N--
--7lMq7vMTJT4tNk0a
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFDne05zdlT34LClWIRAg85AKDBHg57UPStksVrCH9L1UQB5ENr5QCfXSeA
4tfdjRUtEnIHSA1oF/FfalY=
=WzOs
-----END PGP SIGNATURE-----
--7lMq7vMTJT4tNk0a--