Throbber won't display

Below is code for a little informational dialog that I would like to
contain a throbber. The dialog displays fine, updates fine (note it is
shown as non-modal), and a nice square gray patch displays where the
throbber should be. But the throbber images don't appear. Any clues will
be appreciated.

from wxPython.lib.throbber import Throbber
import throbImages

throbber_Images = [throbImages.catalog[i].getBitmap()
                   for i in throbImages.index
                   if i not in ['eclouds', 'logo']]

class InfoDialog(wxDialog):
    def __init__(self, parent, id, title, size, style):
        wxDialog.__init__(self, parent, id, title, size = size, style =
style)

        self.SetBackgroundColour(props.BKE_LIGHT_YELLOW)
        props.SetBKE_ICON(self)

        self.sizer = wxBoxSizer( wxVERTICAL )

        self.throbber = Throbber(self, -1,
                                 throbber_Images, size=(36, 36),
                                 frameDelay = 0.1)

        self.sizer.Add(self.throbber, 0, wxALIGN_CENTER)
        self.throbber.Start()

        # self.msg is just a placeholder since it gets replaced on update
        self.msg = wxStaticText( self, -1, "")
        self.sizer.AddWindow( self.msg, 0,
wxGROW>wxALIGN_CENTER_VERTICAL|wxALL, 5 )

        self.SetAutoLayout( true )
        self.SetSizer( self.sizer )
        self.sizer.Fit( self )
        self.sizer.SetSizeHints( self )

    def update(self, msg):
        # Replace the text to be displayed, re-layout, and update
        self.SetForegroundColour(wxRED)
        self.sizer.Remove(self.msg)
        self.msg = wxStaticText(self, -1, msg)
        self.msg.SetFont( wxFont( 10, wxSWISS, wxNORMAL, wxBOLD ) )
        self.sizer.AddWindow(self.msg, 0,
wxGROW>wxALIGN_CENTER_VERTICAL|wxALL, 5 )
        self.Layout()
        self.sizer.Fit( self )
        self.sizer.SetSizeHints( self )
        self.Update()

···

--------------------------------------
Gary H. Merrill
Director and Principal Scientist, New Applications
Data Exploration Sciences
GlaxoSmithKline Inc.
(919) 483-8456

Hello all,

I've recently upgraded to wxPython 2.5.1.5 by installing the binary
file wxPythonGTK2-py2.3-2.5.1.5-1.i386.rpm from the wxPython website
(since I'm on Slackware, I actually installed it as a tgz package
after doing an rpm2tgz conversion -- however, everything looks like it
installed properly).

I'm having a problem with code generated by wxDesigner (latest
version, 2.9d). If I create a simple test app with just a frame and
the generic menu items, I get a segmentation fault when clicking on
the 'File -> About' menu item, with the following error message displayed:

    (tstapp.py:12022): Gtk-CRITICAL **: file gtkwidget.c: line 5423 (gtk_widget_set_uposition): assertion `GTK_IS_WIDGET (widget)' failed
    Segmentation fault

Here's the code that wxDesigner generated for the function OnAbout:

    def OnAbout(self, event):
        dialog = wxMessageDialog(self,"Welcome to SuperApp 1.0\n(C)opyright Joe Hacker",
            "About SuperApp", wxOK|wxICON_INFORMATION )
        dialog.CentreOnParent()
        dialog.ShowModal()
        dialog.Destroy()

Any idea on why this code is no good??

I'm still very much a wxPython newbie, and I'm hoping to use
wxDesigner as a learning tool. However, this appears to be a
fundamental incompatibility between wxPython 2.5.1.5 and wxDesigner
2.9d.

Any help would be appreciated,

Thanks!

Peter

Sorry, I meant to post this as a new thread (which I have since done)
and not as a followup here.

Peter

AFAIK wxDesigner is not compatible with 2.5 yet. I think Robin posted this
recently. He wanted to send a copy of 2.5 to Robert so he can start making
the changes.

Hello all,

I've recently upgraded to wxPython 2.5.1.5 by installing the binary
file wxPythonGTK2-py2.3-2.5.1.5-1.i386.rpm from the wxPython website
(since I'm on Slackware, I actually installed it as a tgz package
after doing an rpm2tgz conversion -- however, everything looks like it
installed properly).

I'm having a problem with code generated by wxDesigner (latest
version, 2.9d). If I create a simple test app with just a frame and
the generic menu items, I get a segmentation fault when clicking on
the 'File -> About' menu item, with the following error message displayed:

    (tstapp.py:12022): Gtk-CRITICAL **: file gtkwidget.c: line 5423
(gtk_widget_set_uposition): assertion `GTK_IS_WIDGET (widget)' failed
Segmentation fault

Here's the code that wxDesigner generated for the function OnAbout:

    def OnAbout(self, event):
        dialog = wxMessageDialog(self,"Welcome to SuperApp 1.0\n(C)opyright
Joe Hacker", "About SuperApp", wxOK|wxICON_INFORMATION )
        dialog.CentreOnParent()
        dialog.ShowModal()
        dialog.Destroy()

Any idea on why this code is no good??

I'm still very much a wxPython newbie, and I'm hoping to use
wxDesigner as a learning tool. However, this appears to be a
fundamental incompatibility between wxPython 2.5.1.5 and wxDesigner
2.9d.

Any help would be appreciated,

Thanks!

Peter

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

- --
  UC

- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417

···

On Sunday 11 April 2004 12:24 pm, Peter D. Pawelek wrote:

Thanks for the reply -- I guess I'll go back to 2.4.2 until wxDesigner is
updated.

Peter

"Uwe C. Schroeder" <uwe@oss4u.com> writes:

···

AFAIK wxDesigner is not compatible with 2.5 yet. I think Robin posted this
recently. He wanted to send a copy of 2.5 to Robert so he can start making
the changes.

With a tweak or two to get it to load and run without exceptions it works for me. See attached.

throbTest.py (1.81 KB)

···

gary.h.merrill@gsk.com wrote:

Below is code for a little informational dialog that I would like to
contain a throbber. The dialog displays fine, updates fine (note it is
shown as non-modal), and a nice square gray patch displays where the
throbber should be. But the throbber images don't appear. Any clues will
be appreciated.

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