Ruby curses, bug or my mistake?

Ok, I’ve got a problem in ruby curses. I’m not sure if this is a bug or
if it is me doing something wrong. It’s probably me doing something
wrong, but just checking.

I tried something like this.


win.setpos( 2, 2 )
win.addstr( txt )
win.setpos( 3, 2 )
val = wind.getstr
wind.setpos( 4, 2 )
wind.addstr( val )

The first 4 lines of code work fine. The text shows up on the screen
just fine. The last two lines of code do not work. After I enter the
string I expect it to appear on the screen beginning at line 4 collumn 2
after I press enter. But it doesn’t. The cursor just moves to the next
line and does nothing. This seems really simple I don’t know how I’m
messing up. Someone please point out my obvious mistake.

-Scott

Hi –

···

On Thu, 15 Apr 2004, Scott Rubin wrote:

Ok, I’ve got a problem in ruby curses. I’m not sure if this is a bug or
if it is me doing something wrong. It’s probably me doing something
wrong, but just checking.

I tried something like this.


win.setpos( 2, 2 )
win.addstr( txt )
win.setpos( 3, 2 )
val = wind.getstr
wind.setpos( 4, 2 )
wind.addstr( val )

The first 4 lines of code work fine. The text shows up on the screen
just fine. The last two lines of code do not work. After I enter the
string I expect it to appear on the screen beginning at line 4 collumn 2
after I press enter. But it doesn’t. The cursor just moves to the next
line and does nothing. This seems really simple I don’t know how I’m
messing up. Someone please point out my obvious mistake.

I know 0 about curses but I notice you’re using two different variable
names (win and wind). Is that correct?

David


David A. Black
dblack@wobblini.net

Scott Rubin wrote:

After I enter the
string I expect it to appear on the screen beginning at line 4 collumn 2
after I press enter. But it doesn’t. The cursor just moves to the next
line and does nothing. This seems really simple I don’t know how I’m
messing up. Someone please point out my obvious mistake.

Curses.refresh

Tobias