From: Eero Saynatkari Date: 2006-09-28T07:35:31+09:00 Subject: Re: Curses --h3LYUU6HlUDSAOzy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 position= ing > >>>>>>>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.html > >> > >>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 and= =20 > change to it this window is used for all I/O. Which is exactly what I said. Please review the Curses documentation. http://www.die.net/doc/linux/man/man3/move.3.html http://www.die.net/doc/linux/man/man3/mvwin.3.html --h3LYUU6HlUDSAOzy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFGvxA7Nh7RM4TrhIRAgXsAKCVcDpz0ssd9pBVVPR7lCF/h+ATcwCdGdxY aLz2IVFjLH6zbW8N617ONeo= =Cexe -----END PGP SIGNATURE----- --h3LYUU6HlUDSAOzy--