[wxPython] BUGREPORT: adding empty string to wxComboBox causes an exception

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] BUGREPORT: adding empty string to wxComboBox causes an exception

Paul Sokolovsky-4
Hello wxpython-users,

      Win32. When empty string "" is added to wxComboBox then, when it gets
displayed, process crashes in wxWindows dll. Code to reproduce:

------------
#!python

from wxPython.wx import *

# adding empty string to wxComboBox gives an exception in wxWindows dll

def test():
    class MyApp(wxApp):

        def OnInit(self):
            frame=wxFrame(NULL,-1,"Hi!")
            self.SetTopWindow(frame)

            self.combo=wxComboBox(frame,-1,"",wxDefaultPosition,wxDefaultSize,["one","two",""])

            frame.Show(true)
            return true

    app=MyApp(0)
    app.MainLoop()

if __name__=="__main__": test()
--------------

Best regards,
 Paul                          mailto:[hidden email]



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] BUGREPORT: adding empty string to wxComboBox causes an exception

Robin Dunn
>       Win32. When empty string "" is added to wxComboBox then, when it
gets
> displayed, process crashes in wxWindows dll. Code to reproduce:

I found the bug in the C++ wxComboBox and have fixed it.  It'l be in the
next release, or you can get it from wxWindows CVS.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users