Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
wx.ToplevelWindow.SetIcon: Native MS Windows error dialog pops up in wxPython app, no exception raised, no stack trace
 

Index | Next | Previous | View Flat


gandalf at designaproduct

Sep 13, 2007, 4:29 AM


Views: 57
Permalink
wx.ToplevelWindow.SetIcon: Native MS Windows error dialog pops up in wxPython app, no exception raised, no stack trace

Hello,

I wrote a small program that works uses wxPython. The same application
works on Linux and Windows. When I start it from MS Windows, I see this
error message appearing each time I open a window:

---------------------------
Warehouseclient Error
---------------------------
Can't load image from file '': file does not exist.
---------------------------
OK
---------------------------


The message box itself is a native MS Windows dialog. Otherwise the
program works fine, just here is this annoying message. There is no
exception raised in the Python program. Nothing printed on console. I
figured out that this happens only when I set the icon of the window
using this code:

self.SetIcon(icon)

However, the error dialog is not displayed right after the SetIcon call
and no exception is raised. The dialog is displayed after __init__ has
been called, and probably before EVT_SHOW gets called. Documentation of
SetIcon
(http://wxwidgets.org/manuals/stable/wx_wxtoplevelwindow.html#wxtoplevelwindowseticon)
says that it is safe to delete the icon after calling this function. Now
here are the wreid things:

1. The icon is displayed correctly in the left top corner, so where is
the error?
2. The error message complains about a file. What has
wx.ToplevelFrame.SetIcon do with files?

I'm using: Windows XP Professional, Python 2.5, wxPython 2.8

Thanks,

Laszlo

--
http://mail.python.org/mailman/listinfo/python-list

Subject User Time
wx.ToplevelWindow.SetIcon: Native MS Windows error dialog pops up in wxPython app, no exception raised, no stack trace gandalf at designaproduct Sep 13, 2007, 4:29 AM
    Re: wx.ToplevelWindow.SetIcon: Native MS Windows error dialog pops up in wxPython app, no exception raised, no stack trace kyosohma at gmail Sep 13, 2007, 6:19 AM
    Re: wx.ToplevelWindow.SetIcon: Native MS Windows error dialog pops up in wxPython app, no exception raised, no stack trace kyosohma at gmail Sep 13, 2007, 7:08 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.