Hi,
I am trying to use the MimeTypesManager, but it is giving me a problem.
When I try to get the icon from the wxFileType object it gives me for a file extension, it sometimes pop-up a window telling me:
Error: Failed to load icon from the file '0'
that is of course not what I want, I would prefer an exception, so I can substitute a default icon.
If I do the same thing with the same file extension in the wxPython MimeTypesManager demo, no pop-up window appears (What I want) and the same message is printed out in the log window.
How do I get rid of the pop-up window? Is there some sort of default application error handler I must override? I have tried OnExceptionInMainLoop and OnUnhandledException, but I still get the pop-up.
I would be most grateful for any pointers or help...
Hi, I am trying to use the MimeTypesManager, but it is giving me a
problem.
When I try to get the icon from the wxFileType object it gives me for
a file extension, it sometimes pop-up a window telling me:
Error: Failed to load icon from the file '0'
that is of course not what I want, I would prefer an exception, so I
can substitute a default icon.
If I do the same thing with the same file extension in the wxPython
MimeTypesManager demo, no pop-up window appears (What I want) and the
same message is printed out in the log window.
How do I get rid of the pop-up window? Is there some sort of default
application error handler I must override? I have tried
OnExceptionInMainLoop and OnUnhandledException, but I still get the
pop-up.
It's a wxLog message, so changing the log target as is done in the demo can get rid of the dialog. You can know if the icon was loaded by checking its Ok() method.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!