[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Overdorf, Sam

9/27/2006 1:04:00 AM

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 library
routine.

It is calling the window move function and not the cursor positioning
function.

Thanks,
Sam Overdorf

11 Answers

Michael W. Ryder

9/27/2006 1:32:00 AM

0

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 library
> routine.
>
> It is calling the window move function and not the cursor positioning
> function.
>
> Thanks,
> Sam Overdorf
>

According to O'Reilly's Programming with Curses "move() is really a
#define macro for wmove() which takes a WINDOW* as its first argument."
So it appears that the library is working correctly.

Eero Saynatkari

9/27/2006 3:21:00 AM

0

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 library
> >routine.
> >
> >It is calling the window move function and not the cursor positioning
> >function.
> >
> >Thanks,
> >Sam Overdorf
> >
>
> According to O'Reilly's Programming with Curses "move() is really a
> #define macro for wmove() which takes a WINDOW* as its first argument."
> So it appears that the library is working correctly.

#setpos x, y

Morton Goldberg

9/27/2006 3:50:00 AM

0

On Sep 26, 2006, at 9:03 PM, Overdorf, Sam wrote:

> Is anyone using the Curses class?

You could look at

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...

to see a project that I recently did with Curses.

Regards, Morton



Michael W. Ryder

9/27/2006 6:41:00 AM

0

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 library
>>> routine.
>>>
>>> It is calling the window move function and not the cursor positioning
>>> function.
>>>
>>> Thanks,
>>> Sam Overdorf
>>>
>> According to O'Reilly's Programming with Curses "move() is really a
>> #define macro for wmove() which takes a WINDOW* as its first argument."
>> So it appears that the library is working correctly.
>
> #setpos x, y

What flavor of Curses is this from?

Eero Saynatkari

9/27/2006 7:12:00 PM

0

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 library
> >>>routine.
> >>>
> >>>It is calling the window move function and not the cursor positioning
> >>>function.
> >>>
> >>>Thanks,
> >>>Sam Overdorf
> >>>
> >>According to O'Reilly's Programming with Curses "move() is really a
> >>#define macro for wmove() which takes a WINDOW* as its first 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/C...

Michael W. Ryder

9/27/2006 7:22:00 PM

0

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 library
>>>>> routine.
>>>>>
>>>>> It is calling the window move function and not the cursor positioning
>>>>> function.
>>>>>
>>>>> Thanks,
>>>>> Sam Overdorf
>>>>>
>>>> According to O'Reilly's Programming with Curses "move() is really a
>>>> #define macro for wmove() which takes a WINDOW* as its first 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/C...


The source code shows that it uses Curses' move() function which is a
macro to wmove() as I described above.

Eero Saynatkari

9/27/2006 8:58:00 PM

0

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
> >>>>>library
> >>>>>routine.
> >>>>>
> >>>>>It is calling the window move function and not the cursor positioning
> >>>>>function.
> >>>>>
> >>>>>Thanks,
> >>>>>Sam Overdorf
> >>>>>
> >>>>According to O'Reilly's Programming with Curses "move() is really a
> >>>>#define macro for wmove() which takes a WINDOW* as its first 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/C...
>
>
> The source code shows that it uses Curses' move() function which is a
> 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.

Michael W. Ryder

9/27/2006 10:30:00 PM

0

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
>>>>>>> library
>>>>>>> routine.
>>>>>>>
>>>>>>> It is calling the window move function and not the cursor positioning
>>>>>>> function.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Sam Overdorf
>>>>>>>
>>>>>> According to O'Reilly's Programming with Curses "move() is really a
>>>>>> #define macro for wmove() which takes a WINDOW* as its first 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/C...
>>
>> The source code shows that it uses Curses' move() function which is a
>> 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.

ALL input/output in Curses is done with windows. The only difference
between move() and wmove() is that move() passes the current window to
the wmove() function. When you first start Curses it creates a window
and sets it as the current window. Unless you create another window and
change to it this window is used for all I/O.

Eero Saynatkari

9/27/2006 10:36:00 PM

0

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
> >>>>>>>library
> >>>>>>>routine.
> >>>>>>>
> >>>>>>>It is calling the window move function and not the cursor positioning
> >>>>>>>function.
> >>>>>>>
> >>>>>>>Thanks,
> >>>>>>>Sam Overdorf
> >>>>>>>
> >>>>>>According to O'Reilly's Programming with Curses "move() is really a
> >>>>>>#define macro for wmove() which takes a WINDOW* as its first
> >>>>>>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/C...
> >>
> >>The source code shows that it uses Curses' move() function which is a
> >>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.
>
> ALL input/output in Curses is done with windows. The only difference
> between move() and wmove() is that move() passes the current window to
> the wmove() function. When you first start Curses it creates a window
> and sets it as the current window. Unless you create another window and
> 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/m...
http://www.die.net/doc/linux/man/man3/mv...

Eero Saynatkari

9/27/2006 10:42:00 PM

0

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
> > >>>>>>>library
> > >>>>>>>routine.
> > >>>>>>>
> > >>>>>>>It is calling the window move function and not the cursor positioning
> > >>>>>>>function.
> > >>>>>>>
> > >>>>>>>Thanks,
> > >>>>>>>Sam Overdorf
> > >>>>>>>
> > >>>>>>According to O'Reilly's Programming with Curses "move() is really a
> > >>>>>>#define macro for wmove() which takes a WINDOW* as its first
> > >>>>>>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/C...
> > >>
> > >>The source code shows that it uses Curses' move() function which is a
> > >>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.
> >
> > ALL input/output in Curses is done with windows. The only difference
> > between move() and wmove() is that move() passes the current window to
> > the wmove() function. When you first start Curses it creates a window
> > and sets it as the current window. Unless you create another window and
> > 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/m...
> http://www.die.net/doc/linux/man/man3/mv...

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().