I was trying to use the 2 new classes I wrote in the last days
(FancyButtonPanel and FlatNotebook), and I tried both with the new 2.7
pre-release. Well, curiously enough, the method:
wx.Rect.Inside(aPoint)
Has magically disappeared (deprecation warning); the new method:
wx.Rect.Contains(aPoint)
Should replace it. Ok, no problem for that, it's just a name.
*However*, the Contains method didn't exist in previous versions of
wxPython. So, what I am supposed to do with that? What if I would like
to support both 2.6.3.3 and 2.7? Deprecating a function should be done
after a period of co-existance with another method (Inside and
Contains should have lived together for a while) or if this method
doesn't do anything anymore (like DC.BeginDrawing() and
DC.EndDrawing()).
So, which is the alternative? Should I subclass wx.Rect() in some way
to return Contains() instead of Inside() by checking the wxPython
version (no idea how to do it right now)? Are there other
alternatives?
Ironically and sadly enough, these small adjustments to wx (together
with some playing that has been done on EVT_SIZE handling) have been
able to kill half of my widgets on wxPython (not talking about the
effects they had on wx.Sizers). It's always a joy for me to create
something new with wxPython, that rocks. But it's not amazing at all
reinventing the wheel everytime because of such modifications in wx.
Thank you for every suggestions, and sorry for the plea.
what I did in a similar situation last year with the 2.4 → 2.6 migration was to inject new functionality in the old class and to use it like the new class…
Like this:
I was trying to use the 2 new classes I wrote in the last days
(FancyButtonPanel and FlatNotebook), and I tried both with the new 2.7
pre-release. Well, curiously enough, the method:
wx.Rect.Inside
(aPoint)
Has magically disappeared (deprecation warning); the new method:
wx.Rect.Contains(aPoint)
Should replace it. Ok, no problem for that, it’s just a name. However, the Contains method didn’t exist in previous versions of
wxPython. So, what I am supposed to do with that? What if I would like
to support both 2.6.3.3 and 2.7? Deprecating a function should be done
after a period of co-existance with another method (Inside and
Contains should have lived together for a while) or if this method
doesn’t do anything anymore (like DC.BeginDrawing() and
DC.EndDrawing()).
So, which is the alternative? Should I subclass wx.Rect() in some way
to return Contains() instead of Inside() by checking the wxPython
version (no idea how to do it right now)? Are there other
alternatives?
Ironically and sadly enough, these small adjustments to wx (together
with some playing that has been done on EVT_SIZE handling) have been
able to kill half of my widgets on wxPython (not talking about the
effects they had on wx.Sizers). It’s always a joy for me to create
something new with wxPython, that rocks. But it’s not amazing at all
reinventing the wheel everytime because of such modifications in wx.
Thank you for every suggestions, and sorry for the plea.
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”
I was trying to use the 2 new classes I wrote in the last days
(FancyButtonPanel and FlatNotebook), and I tried both with the new 2.7
pre-release. Well, curiously enough, the method:
wx.Rect.Inside(aPoint)
Has magically disappeared (deprecation warning); the new method:
wx.Rect.Contains(aPoint)
Should replace it. Ok, no problem for that, it's just a name.
*However*, the Contains method didn't exist in previous versions of
wxPython. So, what I am supposed to do with that?
I'll undeprecate it for now. When things like this happen I usually do make them both be available (one as an alias for the other.) Not sure why I didn't this time.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!