As the title suggests, due to revision 6104 trunk can't be built with wx-2.9. Reason is the inclusion of following two files in trunk - include\scrollingdialog.h and sdk\scrollingdialog.cppI don't see them in the SVN tree of wx 2.9???
These files are part of wx-2.9 [...]
I just downloaded the 2.9 tarball and did not find wxScrollingDialog either, it's also not in actual trunk ( http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk ).As the title suggests, due to revision 6104 trunk can't be built with wx-2.9. Reason is the inclusion of following two files in trunk - include\scrollingdialog.h and sdk\scrollingdialog.cppI don't see them in the SVN tree of wx 2.9???
These files are part of wx-2.9 [...]
wxScrollingDialog: public wxDialog, public wxDialogHelper
IIRC, it is wxDialogLayoutAdapter that is the problem.
See wx/dialog.h and src/common/dlgcmn.cpp and for possible name clash with the name wxDialogLayoutAdapter used in C::B scrollingdialog.h.
I tried to create a patch but was not able to because of wx2.9.x changes to wxDialog made the fix to complex for me to do. The problem was class inheritance was changed too much for me to fix; I do NOT know C++ well enough to fix the issue.
IIRC, The below code was a problem, both wxDialogHelper and wxDialog had a common base class; where the right method was hard to determine which should be done.CodewxScrollingDialog: public wxDialog, public wxDialogHelper
Tim S.
The sources are not copied from wxWidgets, they are taken from this site: http://www.anthemion.co.uk/code.htm (http://www.anthemion.co.uk/code.htm).
As the title suggests, due to revision 6104 trunk can't be built with wx-2.9. Reason is the inclusion of following two files in trunk - include\scrollingdialog.h and sdk\scrollingdialog.cppI don't see them in the SVN tree of wx 2.9???
These files are part of wx-2.9 [...]
IIRC, it is wxDialogLayoutAdapter that is the problem.
Index: src/sdk/scrollingdialog.cpp
===================================================================
--- src/sdk/scrollingdialog.cpp (revision 6119)
+++ src/sdk/scrollingdialog.cpp (working copy)
@@ -23,6 +23,7 @@
#define wxEXTRA_DIALOG_HEIGHT 0
#endif
+#if (!wxCHECK_VERSION(2, 9, 0))
IMPLEMENT_CLASS(wxDialogLayoutAdapter, wxObject)
/*!
@@ -402,6 +403,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxDialogLayoutAdapterModule, wxModule)
+#endif
+
/*!
* wxScrollingDialog
*/
@@ -410,7 +413,9 @@
void wxScrollingDialog::Init()
{
+#if (!wxCHECK_VERSION(2, 9, 0))
wxDialogHelper::SetDialog(this);
+#endif
}
bool wxScrollingDialog::Create(wxWindow *parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name)
@@ -444,7 +449,9 @@
void wxScrollingPropertySheetDialog::Init()
{
+#if (!wxCHECK_VERSION(2, 9, 0))
wxDialogHelper::SetDialog(this);
+#endif
}
/// Returns the content window
Index: src/include/scrollingdialog.h
===================================================================
--- src/include/scrollingdialog.h (revision 6119)
+++ src/include/scrollingdialog.h (working copy)
@@ -23,12 +23,15 @@
*/
class wxScrollingDialog;
+#if (!wxCHECK_VERSION(2, 9, 0))
class wxDialogHelper;
+#endif
class wxBoxSizer;
class wxButton;
class wxScrolledWindow;
+#if (!wxCHECK_VERSION(2, 9, 0))
class wxDialogLayoutAdapter: public wxObject
{
DECLARE_CLASS(wxDialogLayoutAdapter)
@@ -153,11 +157,16 @@
static bool sm_layoutAdaptation;
};
+#endif
+
/*!
* A class that makes its content scroll if necessary
*/
-class wxScrollingDialog: public wxDialog, public wxDialogHelper
+class wxScrollingDialog: public wxDialog
+#if (!wxCHECK_VERSION(2, 9, 0))
+ , public wxDialogHelper
+#endif
{
DECLARE_CLASS(wxScrollingDialog)
public:
@@ -195,7 +204,10 @@
* A wxPropertySheetDialog class that makes its content scroll if necessary.
*/
-class wxScrollingPropertySheetDialog : public wxPropertySheetDialog, public wxDialogHelper
+class wxScrollingPropertySheetDialog : public wxPropertySheetDialog
+#if (!wxCHECK_VERSION(2, 9, 0))
+ , public wxDialogHelper
+#endif
{
public:
wxScrollingPropertySheetDialog() : wxPropertySheetDialog() { Init(); }
I attach a patch that works for me on debian 64-bit with self-compiled wx2.9.
There are some more fixes, I needed to make it compile the sources.
I did not (yet) change anything in contrib-plugins workspace.
wx2.9 has the whole scrollingdialog-abilities in wxDialogBase, but it is disbaled by default.
The patch only subclasses wxDialog (as suggested by Biplab) and switches layout adaptation on.
I do not get the id of e.g. wxCheckBoxes with XRCID and therfore any attempt to open for example the editor configuration dialog leads to a crash.
Is that a problem with my build of wxWidgets 2.9 or does that also happen to you (on windows).
Nevertheless please test the patch and post your feedback.
Same here. It crashes on Windows, too. If you follow my Win-64-bit thread, I've mentioned about this crash.
I found two causes for the crash, one can simply be fixed, the other one is definitely a wxWidgets bug.
If a dimension of wxFledgridSizer is not set correctly (too large or too small) it (or it's contents will not be read correctly by the xrc-loader.
changing all dynamic dimensions to 0 (or the correct value) makes it work again.
I personally prefer 0, because it's used by wxWidgets for dynamically dimensions. So we will not get trouble if components are added or removed.
The other crash is cause by a bug in wxListbook.
I filed a bug-report (with a simple patch) to the wxWidgets bug-tracker:
http://trac.wxwidgets.org/ticket/11698 (http://trac.wxwidgets.org/ticket/11698) .
EDIT:
I just committed a corrected version of the editorconf-xrc.
For the second crash-cause you have to patch wxWidgets or wait for an upstream fix.