scriptsrc / npyscreen

Automatically exported from code.google.com/p/npyscreen
Other
0 stars 1 forks source link

Implementation Wish / Menu behavior #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
FEATURE-Request:

The NewMenu looks very clean, but would be nice to have the Same Menu as an 
Widget.

I think it would be a good Idea to reuse the structures.

It's possible to select a Menu by the ENTER key ? 
For Example:
Open Menu (Strg+X) 
move with cursor
and Hit Enter --> calling onSelectFunction
Pressing Escape or Strg+X again goes on level up.

Currently you must select/mark a Entry with Space and
an additional Enter/escape/TAB call the marked MenuItem, not the currently 
selected.

Please contact me, if you have additional questions.

Original issue reported on code.google.com by gj12345...@googlemail.com on 5 Jun 2011 at 10:04

GoogleCodeExporter commented 9 years ago
It seems the menu h_select_exit and h_exit are never called in WIN32.
the Keyhandler set editing to False, but not call one of this Function --> 
value is still None

Im using python2.7

Original comment by gj12345...@googlemail.com on 5 Jun 2011 at 10:56

GoogleCodeExporter commented 9 years ago
I found it:
On Windows you get cursor.ascii.FF instead of LF this is decimal 13
13 is registered with exit_down.
in wgwidget.py :
 "^N":                self.h_exit_down, 
it seems registering asci.FF after this, doesnt overwrite this handler...

Can you help me ?

Original comment by gj12345...@googlemail.com on 5 Jun 2011 at 11:10

GoogleCodeExporter commented 9 years ago
I'm stupid:

LF was 12 not 13
CR is 13 

Adding 
"curses.ascii.CR:    self.h_select_exit,"

to wgmultiline.py MultiLine.set_up_handlers
works.

Original comment by gj12345...@googlemail.com on 5 Jun 2011 at 11:16

GoogleCodeExporter commented 9 years ago
Thanks for this.  Sorry to have been slow replying but I've been away.  I'll 
add your fix to the library now.  Has that now fixed this whole bug, or is the 
behaviour still not want you want?

Original comment by nicholas.cole on 9 Jul 2011 at 4:54

GoogleCodeExporter commented 9 years ago

Original comment by nicholas.cole on 9 Jul 2011 at 5:06