wxPython-specific bug reports/feature requests

Robin,

The links for "report a bug" and "feature request" on the wxPython.org
page go the the wxWindows sourceforge project. But what if we want
to request something specifically to do with wxPython? There's no
"category" or "group" for this that I can find; what should we do?

(And yes, there's a reason I'm asking...)

Viz: It's not a natural thing in C++ to "set/get a list", but it IS
perfectly natural in python. As a result, I've had to write
functions for wxListBox and wxComboBox of the form:

def setList(ctl, l):
    ctl.Clear()
    for elem in l:
        ctl.Append(elem)

def getList(ctl):
    rl = []
    for i in ctl.GetCount():
        rl.append(ctl.GetString(i))
    return rl

and it'd be nice not to have to do this for wxListBoxes, wxComboBoxes
or require derived classes just to get this functionality...

What should we do in such circumstances?
(I posted to the group so we can all see the question and answer.)

/Will Sadkin
Parlance Corporation

The second-to-last Category entry (scroll way-way down) for wxWindows _bugs_ is "wxPython specific".

Since there are no categories for "feature request", an undifferentiated request is probably what the wx-dev people would like, though I'd guess naming it something like "wxPython: List Set/Get methods" would be appreciated.

As a note, the wrapper code is such that if you were to write a robust, general version of the code in Python (which is _far_ easier than doing it in C++), it can fairly easily be included in the wrappers with a %shadow{} section or translated into C++ with some work. You can test it simply adding the methods to the shadow-classes you feel should be modified (they're in your wxPython directory).

Note that you'd want to follow wxPython standards, such as:

    * function names: GetList or GetValue, SetList or SetValue
    * generate watchable events (wxListChangedEvt, EVT_LIST_CHANGED)

And then you would likely want to document:

    * What it does?
          o What the side-effects are? (e.g. clearing all current values)
          o What about the lower-level events, are they suppressed or not?
          o Related functions (e.g. a version that just appends-multiple
            rather than clearing first)
          o What events are sent, and what their attributes/properties
            are available on those events
          o What is the effect on the current selection when:
                + current selection exists in new set (by name/value or
                  position)
                + current selection doesn't exist in new set (by
                  name/value or position)
    * What it requires from the passed value (does it make a copy or
      keep a reference)? o iterable
          o all items must be strings/unicode? Or will it call
            unicode/str/repr on non-string values?
    * Can I modify the list after passing it in and see the results in
      the control?

And finally, you'd want to provide the list of controls that should have the change (with implementations for all of them if they can't all use the same implementation). I personally wouldn't vote for the approach of adding an isolated method because I feel what's needed is an entire layer of OO functionality (on top of/within) wxPython. Luckily, I don't have a vote :wink: .

I'm not trying to discourage you from submitting the request, just from submitting a "please do this" request w/out doing some of the "definition" legwork. If you do all of the above (at least documenting what the behaviour you're looking for is explicitly), you'll probably have a much better chance of getting a change accepted/completed in a reasonable amount of time (Robin's a very busy man, and AFAIK he's the only wx-dev person who works on wxPython issues).

Enjoy,
Mike

Will Sadkin wrote:

···

Robin,

The links for "report a bug" and "feature request" on the wxPython.org
page go the the wxWindows sourceforge project. But what if we want to request something specifically to do with wxPython? There's no "category" or "group" for this that I can find; what should we do?

(And yes, there's a reason I'm asking...)

Viz: It's not a natural thing in C++ to "set/get a list", but it IS
perfectly natural in python. As a result, I've had to write
functions for wxListBox and wxComboBox of the form:

def setList(ctl, l):
   ctl.Clear()
   for elem in l:
       ctl.Append(elem)

def getList(ctl):
   rl =
   for i in ctl.GetCount():
       rl.append(ctl.GetString(i))
   return rl

and it'd be nice not to have to do this for wxListBoxes, wxComboBoxes
or require derived classes just to get this functionality...

What should we do in such circumstances?
(I posted to the group so we can all see the question and answer.)

/Will Sadkin
Parlance Corporation

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/

Will Sadkin wrote:

Robin,

The links for "report a bug" and "feature request" on the wxPython.org
page go the the wxWindows sourceforge project. But what if we want to request something specifically to do with wxPython? There's no "category" or "group" for this that I can find; what should we do?

There should be a wxPython-specific category for bugs and patches. For feature requests "Feature Request" is the category.. I like to keep them with the wxWindows because most of the time there is at least some overlap, and often something reported as a wxPython bug is really a bug in the C++ somewhere.

(And yes, there's a reason I'm asking...)

Viz: It's not a natural thing in C++ to "set/get a list", but it IS
perfectly natural in python. As a result, I've had to write
functions for wxListBox and wxComboBox of the form:

def setList(ctl, l):
    ctl.Clear()
    for elem in l:
        ctl.Append(elem)

def getList(ctl):
    rl =
    for i in ctl.GetCount():
        rl.append(ctl.GetString(i))
    return rl

and it'd be nice not to have to do this for wxListBoxes, wxComboBoxes
or require derived classes just to get this functionality...

What should we do in such circumstances?
(I posted to the group so we can all see the question and answer.)

Python methods like this can easily be added to the wrapper classes generated by SWIG, they just won't be documented until I work out he new documentaion system.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!