This version includes a few new optimizations, and has been re-structured as a package, plus who knows what bug fixes.
I'm also only testing on 2.5.1 now, if you want it to work with 2.4.*, you'll have to do a little work. I am using Robin's fixdc script so the DC methods should be compatible.
This version is MUCH improved over the one in the demo. Most notable is that binding callbacks to various mouse events on the objects is now supported, so it can be used for interactive use.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
I've talked about this before, but I'm going to try one more time:
It would be really great if wx.InitAllImageHandlers() could be called more than once, with subsequent calls being a no-op. The way it is now, the only place to call it is in the App's OnInit. If you write a module that needs it, whoever uses that module has to know that it is required. I just spent over a half an hour tracking down this problem with one of my own modules! It was very annoying, and it would be so much easier if I could have put the wx.InitAllImageHandlers() in the module that needed it.
It could be very easy to do this. All you need is a two liner module: wxPython.lib.InitImageHandlers.py
that had:
import wx
wx.InitAllImageHandlers()
then we could all just
import wxPython.lib.InitImageHandlers
and it would only get run the first time. It would be even better to have code in wx.InitAllImageHandlers() that checked to see if they had all be Init-ed before, but that would be more work.
By the way, as another note, I just tried creating a wx.ScreenDC before creating and initializing an app, and I got a segfault. This is to be expected, but an error would be a lot nicer than a seg fault.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
It could be very easy to do this. All you need is a two liner module: wxPython.lib.InitImageHandlers.py
There's a module in the upcoming wxoo release that does exactly this, but yes, it really is something that needs to be fixed at a lower level (i.e. in wxPython, not an add-on, otherwise every package that uses this approach is going to conflict with every other package using it).
By the way, as another note, I just tried creating a wx.ScreenDC before creating and initializing an app, and I got a segfault. This is to be expected, but an error would be a lot nicer than a seg fault.
You wouldn't believe how much reworking this series of changes (requiring app initialisation before common low-level operations can proceed) is causing for me. Enough that I just had to drop the whole porting to 2.5 project mid-way almost a month ago and still haven't had the time to re-start it. Really does seem to be a significant step backward for writing composable UI controls/components.
I've talked about this before, but I'm going to try one more time:
It would be really great if wx.InitAllImageHandlers() could be called more than once, with subsequent calls being a no-op. The way it is now, the only place to call it is in the App's OnInit. If you write a module that needs it, whoever uses that module has to know that it is required. I just spent over a half an hour tracking down this problem with one of my own modules! It was very annoying, and it would be so much easier if I could have put the wx.InitAllImageHandlers() in the module that needed it.
One way or another (I havn't decided which way yet) this will be done for the next release.
By the way, as another note, I just tried creating a wx.ScreenDC before creating and initializing an app, and I got a segfault. This is to be expected, but an error would be a lot nicer than a seg fault.
Yep, I'm working ideas for this too, but I'm not sure if I'll have a satifactory solution or not by the time everything else is ready to release.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
One way or another (I havn't decided which way yet) this will be done for the next release.
Fabulous!
As I think about it, if it's not too difficult, making wx.InitAllImageHandlers() able to be called multiple times is the much preferred solution, for backwards compatibility's sake.
By the way, as another note, I just tried creating a wx.ScreenDC before creating and initializing an app, and I got a segfault. This is to be expected, but an error would be a lot nicer than a seg fault.
Yep, I'm working ideas for this too, but I'm not sure if I'll have a satifactory solution or not by the time everything else is ready to release.
Any number of reduced seg faults is good, whenever you get to it.
thanks, Robin.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
One way or another (I havn't decided which way yet) this will be done for the next release.
Fabulous!
As I think about it, if it's not too difficult, making wx.InitAllImageHandlers() able to be called multiple times is the much preferred solution, for backwards compatibility's sake.
Yes, I agree. There are a couple ways to approach that however. That's the "which way" decision I was refering to.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!