From: Eero Saynatkari Date: 2006-09-28T07:41:30+09:00 Subject: Re: Curses --MPkR1dXiUZqK+927 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2006.09.28 07:35, Eero Saynatkari wrote: > On 2006.09.28 07:30, Michael W. Ryder wrote: > > Eero Saynatkari wrote: > > >On 2006.09.28 04:25, Michael W. Ryder wrote: > > >>Eero Saynatkari wrote: > > >>>On 2006.09.27 15:45, Michael W. Ryder wrote: > > >>>>Eero Saynatkari wrote: > > >>>>>On 2006.09.27 10:35, Michael W. Ryder wrote: > > >>>>>>Overdorf, Sam wrote: > > >>>>>>>Is anyone using the Curses class? > > >>>>>>>Is anyone maintaining the Curses class? > > >>>>>>> > > >>>>>>>It looks like the Curses function move(y,x) is calling the wrong= =20 > > >>>>>>>library > > >>>>>>>routine. > > >>>>>>> > > >>>>>>>It is calling the window move function and not the cursor positi= oning > > >>>>>>>function. > > >>>>>>> > > >>>>>>>Thanks, > > >>>>>>>Sam Overdorf > > >>>>>>> > > >>>>>>According to O'Reilly's Programming with Curses "move() is really= a=20 > > >>>>>>#define macro for wmove() which takes a WINDOW* as its first=20 > > >>>>>>argument" So it appears that the library is working correctly. > > >>>>>#setpos x, y > > >>>>What flavor of Curses is this from? > > >>>This one: > > >>> > > >>> http://www.ruby-doc.org/stdlib/libdoc/curses/rdoc/classes/Curses.ht= ml > > >> > > >>The source code shows that it uses Curses' move() function which is a= =20 > > >>macro to wmove() as I described above. > > > > > >No, move() moves the cursor (wmove() moves a specified window's cursor= ). > > > > > >Confusingly, Ruby's Curses bindings also have a .move which actually > > >uses mvwin() which moves the window itself. > >=20 > > ALL input/output in Curses is done with windows. The only difference= =20 > > between move() and wmove() is that move() passes the current window to= =20 > > the wmove() function. When you first start Curses it creates a window= =20 > > and sets it as the current window. Unless you create another window an= d=20 > > change to it this window is used for all I/O. >=20 > Which is exactly what I said. Please review the Curses documentation. >=20 > http://www.die.net/doc/linux/man/man3/move.3.html > http://www.die.net/doc/linux/man/man3/mvwin.3.html =20 And yes, Ruby's Curses.move is not the same as move(). Curses.move is the same as mvwin(). Curses.setpos is the same as move(). --MPkR1dXiUZqK+927 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFGv2m7Nh7RM4TrhIRAsb2AKCgNIiUgGQiqZB4FaNiRhmgPc97wgCgugiu js+zQFXsNIf5K5iXfnQAg+o= =WHFS -----END PGP SIGNATURE----- --MPkR1dXiUZqK+927--