wxRect::Inside change and version numbering

Hello,

From 2.4.0.2 to 2.4.0.7 the wxPython side of wxRect::Inside changes from

taking two args (x,y) to taking just one arg, a wxPoint. This has broken a
bit of code here and in patching it we tried to use the wx version macros to
determine which should be run, since we run three different sets of versions
of Python+wxPython here. In doing so the 2.4.0.2 and 2.4.0.7 versions are
(seemingly documentedly) indistinguishable since wxWindows only defines
wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER, the first three parts of
2.4.0.2/7. Is this available but just not documented, or have I not looked
hard enough? :slight_smile:

Thanks,
Jordan

Jordan Tucker wrote:

Hello,

From 2.4.0.2 to 2.4.0.7 the wxPython side of wxRect::Inside changes from
taking two args (x,y) to taking just one arg, a wxPoint. This has broken a
bit of code here and in patching it we tried to use the wx version macros to
determine which should be run, since we run three different sets of versions
of Python+wxPython here. In doing so the 2.4.0.2 and 2.4.0.7 versions are
(seemingly documentedly) indistinguishable since wxWindows only defines
wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER, the first three parts of
2.4.0.2/7. Is this available but just not documented, or have I not looked
hard enough? :slight_smile:

In 2.4.0.7 and earlier releases the complete version is in the wxPython.wx.__version__ string. Starting in 2.4.1, instead of just wrapping the version values in wxWindows there is code like this, generated by setup.py:

wxVERSION_STRING = '2.4.1.2'
wxMAJOR_VERSION = 2
wxMINOR_VERSION = 4
wxRELEASE_VERSION = 1
wxSUBREL_VERSION = 2
wxVERSION = (wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_VERSION,
              wxSUBREL_VERSION, '')
wxRELEASE_NUMBER = wxRELEASE_VERSION # for compatibility

For your specific problem above you can check for the existence of wxRect.InsideXY and use it if present. For example:

try:
  MyRectInside = wxRect.InsideXY
except:
  MyRectInside = wxRect.Inside

ยทยทยท

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