[ wxwindows-Bugs-1570631 ] GetValue of wxComboBox return old value

SourceForge.net noreply at sourceforge.net
Wed Oct 4 05:15:42 PDT 2006


Bugs item #1570631, was opened at 2006-10-04 14:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1570631&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: magant (magant)
Assigned to: Nobody/Anonymous (nobody)
Summary: GetValue of wxComboBox return old value

Initial Comment:
When for a wxComboBox a value in the selection list is 
selected, then within the event handling (callback) 
established via EVT_COMBOBOX or EVT_TEXT:
<event>.GetString() correctly returns the NEW value but
<combobox>.GetValue() returns the OLD value although 
the documentation says it should return the NEW value.

This error appears in wxWidgets 2.6.3.3, it worked 
correctly in wxWidgets 2.4.2.4, both under Windows and 
wxPython.

Modified code of the wxPython demo of the wxComboBox:

    # When the user selects something, we go here.
    def EvtComboBox(self, evt):
        cb = evt.GetEventObject()
        data = cb.GetClientData(evt.GetSelection())
        self.log.WriteText('EvtComboBoxy: %
s\nClientData: %s\n' % (evt.GetString(), data))
        self.log.WriteText('CB: %s\n' % (cb.GetValue
()))

        if evt.GetString() == 'one':
            self.log.WriteText("You follow directions 
well!\n\n")


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1570631&group_id=9863




More information about the wx-dev mailing list