[wxPython] Possible bug...?

Howdy y'all,

I don't usually yell about bugs when something strange happens, but this one
is quite peculiar...

In one of my applications I call (create, call and destroy) a
wxSingleChoiceDialog twice. I just got a new computer, installed wxPython-
2.3.0, and started the application. To my surprise, the app hangs after
showing (and destroying) the first dialog. The second one doesn't show up,
and the application just sits there idly.

Of course, it's possible that I'm doing something wrong, but this used to
work on my previous computer.

Here's the data:
Current computer: Windows XP (oy vey), Python 2.1, wxPython-2.3.0 (just
upgraded to 2.3.1 which shows the same result).
Previous computer: Windows 98, Python 2.0, wxPython-2.3.0 (I think, could
have been 2.2.5 or so).

It could be a Windows XP "feature", I don't know much about that.

The following code reproduces the behavior, at least on my machine:

#--begin

# wxtest.py

from wxPython.wx import *

def pickccg(frame):
    ccglist = ["1", "2", "3"]
    dlg = wxSingleChoiceDialog(frame, 'Pick a CCG:', 'Pick a CCG', ccglist)
    if dlg.ShowModal() == wxID_OK:
        result = dlg.GetStringSelection()
    else:
        result = ""
    dlg.Destroy()
    return result

def pickuser(frame, ccg):
    ccglist = ["a", "b", "c"]
    dlg = wxSingleChoiceDialog(frame, 'Pick a CCG:', 'Pick a CCG', ccglist)
    if dlg.ShowModal() == wxID_OK:
        result = dlg.GetStringSelection()
    else:
        result = ""
    dlg.Destroy()
    return result

class MyApp(wxApp):
    def OnInit(self):
        ccg = pickccg(NULL)
        user = pickuser(NULL, ccg)
        print ccg, user
        return true

app = MyApp(0)
app.MainLoop()

#--end

It does work with only one dialog, but not with two. <scratches head>

Ideas, anyone?

I don't usually yell about bugs when something strange happens, but this

one

is quite peculiar...

In one of my applications I call (create, call and destroy) a
wxSingleChoiceDialog twice. I just got a new computer, installed wxPython-
2.3.0, and started the application. To my surprise, the app hangs after
showing (and destroying) the first dialog. The second one doesn't show up,
and the application just sits there idly.

Try 2.3.2b6. It doesn't do it in my current workspace.

···

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

Looks ok, works fine here (Linux 2.4, wxPython 2.3.1).
Sorry, no help...

Greetings,
Jochen
- --
Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité GnuPG key: 44BCCD8E
        Sex, drugs and rock-n-roll

···

On Sat, 10 Nov 2001 01:07:20 -0500 Hans Wurmy Mari wrote:

The following code reproduces the behavior, at least on my machine:

OK, I did that, but I still get this behavior. :frowning: Maybe it's because of
Windows XP? Or are you using WinXP too?

···

On 9 Nov 2001, at 22:16, Robin Dunn wrote:

> In one of my applications I call (create, call and destroy) a
> wxSingleChoiceDialog twice. I just got a new computer, installed wxPython-
> 2.3.0, and started the application. To my surprise, the app hangs after
> showing (and destroying) the first dialog. The second one doesn't show up,
> and the application just sits there idly.
>

Try 2.3.2b6. It doesn't do it in my current workspace.

> > In one of my applications I call (create, call and destroy) a
> > wxSingleChoiceDialog twice. I just got a new computer, installed

wxPython-

> > 2.3.0, and started the application. To my surprise, the app hangs

after

> > showing (and destroying) the first dialog. The second one doesn't show

up,

> > and the application just sits there idly.
> >
>
> Try 2.3.2b6. It doesn't do it in my current workspace.

OK, I did that, but I still get this behavior. :frowning: Maybe it's because of
Windows XP? Or are you using WinXP too?

No, Win2k. It happened to me with 2.3.1 but not my current workspace, which
is actually almost 2.3.2b7, so my guess is that it will be solved for you
with the next beta snapshot.

···

On 9 Nov 2001, at 22:16, Robin Dunn wrote:

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