[Python-bugs-list] [ python-Bugs-417212 ] curses.newwin can return pads
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 11 May 2001 09:38:52 -0700
Bugs item #417212, was updated on 2001-04-18 19:22
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=417212&group_id=5470
Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: David M. Cooke (dmcooke)
>Assigned to: A.M. Kuchling (akuchling)
Summary: curses.newwin can return pads
Initial Comment:
In 2.1 (at least), curses.newwin can return a pad
object if it's called with two arguments, i.e.
win = curses.newwin(0,0)
Since this is actually a pad, win.refresh has to be
called with six arguments -- the syntax used for
refreshing a pad -- instead of as just win.refresh()
Looking at the code for _cursesmodule.c, it appears
that only win.refresh() and win.noutrefresh() take
different arguments depending on whether win is
actually a window or a pad.
It looks like there are three options here:
- document that the two-argument version of
curses.newwin returns a pad (and hence the six-argument
.refresh() must be used)
- make curses.newwin take four arguments only (as the
two argument version is currently equivalent to newpad)
- have win.refresh() and win.noutrefresh() do sensible
things for pads (although I don't know what that would
be...)
I would think #2 is the best.
Hmm, perhaps there should be a separate object type for
pads, so we can tell the difference between pads and
windows.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=417212&group_id=5470