We have committed an important change to SVN towards the wx30 development. As a dev, please read carefully:
1.) We set wx 2,8,12 as minimum version for compile time assertions. This means, the SDK won't compile with wx versions below that.
2.) We removed a lot of wrapper code wrt wx version 2.4.x [...] 2.8.11
3.) We changed wx29 checks to proper wx3 checks. With the release of wx3 the wx29 devel branch isn't used anyways.
4.) Left are ONLY: wx2.8.12, wx30 and wx31 checks in the code base
5.) ONE EXCEPTION: Actively maintained 3rd party libs (like wxPDFDoc) have been left "as-is".
So the new guideline that should makes things easier for you is:
- don't care about wx versions below 2.8.12
- that said, we won't accept any wrapped code like wxCHECK_VERSION(2, 6, 0) or alike
- wrap your wx30-only code using wxCHECK_VERSION(3, 0, 0) (notice the space between the numbers)
- wrap your wx31-only code using wxCHECK_VERSION(3, 1, 0) (notice the space between the numbers)
- there is one exception: you can (and should) leave code of actively maintained 3rd party wx components untouched
FYI: You might wish to look at sdk/scrollingdialog.cpp because I think it might violate your rules.
Edit: Looks like someone fixed it in the wrong way in the past; did NOT look at SVN history.
What it was in the past; as found on http://www.anthemion.co.uk/code.htm (http://www.anthemion.co.uk/code.htm)
// The wxRTTI is wrong for wxNotebook in < 2.8.8 and 2.9, so use dynamic_cast instead
#if !wxCHECK_VERSION(2,8,8) || (wxCHECK_VERSION(2,9,0) && !wxCHECK_VERSION(3,0,0))
wxBookCtrlBase* bookContentWindow = dynamic_cast<wxBookCtrlBase*>(dialog->GetContentWindow());
#else
wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase);
#endif
What it is now.
// The wxRTTI is wrong for wxNotebook in < 2.8.8 and 2.9, so use dynamic_cast instead
#if !wxCHECK_VERSION(2, 8, 8) && !wxCHECK_VERSION(3, 0, 0)
wxBookCtrlBase* bookContentWindow = dynamic_cast<wxBookCtrlBase*>(dialog->GetContentWindow());
#else
wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase);
#endif
What I think it should be by your rules.
// The wxRTTI is wrong for wxNotebook in < 2.8.8 and 2.9, so wxDynamicCast does NOT work for those versions.
wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase);
Tim S.
Good point and corrected. We have customised scrollingdialog already, so its no longer a (actively developed) and clean 3rd party lib.