|
From: Thomas A. N. <ta...@po...> - 2000-05-04 01:21:30
|
Harry and folks,
I got menu_example working. Here's the diff:
[tan@tan examples]$ diff menu_example.py
menu_example_tan.py
16c16,17
<
---
> stdscr.refresh()
>
36,37c37,38
< doupdate()
<
---
> doupdate() # update read screen
>
41,42c42,45
< ch = getch()
< if ch == KEY_UP:
---
> # ch = getch()
> ch = menu_window.getch()
> # if ch == KEY_UP:
> if ch == ord('u'):
44c47,48
< elif ch == KEY_DOWN:
---
> # elif ch == KEY_DOWN:
> elif ch == ord('d'):
--
I had to change getch() to menu_window.getch() in the input
loop.
I had to add a refresh after the stdscr was created in
order to see it. Before I changed getch() to
menu_window.get(), the stdscr did get displayed (but the
menu window didn't).
KEY_DOWN and KEY_UP aren't recognized
(and they are when I'm using cursesmodule-1.5b2). (I
haven't tried the HOME and END keys.)
Tom
---
Tom Newman ta...@po...
|