Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Rev 6104 breaks build with wx-2.9

<< < (2/3) > >>

Jenna:

--- Quote from: stahta01 on January 29, 2010, 10:21:27 pm ---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.


--- Code: ---wxScrollingDialog: public wxDialog, public wxDialogHelper

--- End code ---

Tim S.

--- End quote ---

That should be easy to fix.

Biplab:

--- Quote from: jens on January 29, 2010, 08:06:24 pm ---The sources are not copied from wxWidgets, they are taken from this site: http://www.anthemion.co.uk/code.htm.

--- End quote ---

--- Quote from: MortenMacFly on January 29, 2010, 09:11:40 pm ---
--- Quote from: Biplab on January 29, 2010, 05:20:40 pm ---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.cpp

These files are part of wx-2.9 [...]

--- End quote ---
I don't see them in the SVN tree of wx 2.9???

--- End quote ---

Yes. Both of you are right. Sorry for not investigating it in detail (it was mid-night here).


--- Quote from: stahta01 on January 29, 2010, 10:21:27 pm ---IIRC, it is wxDialogLayoutAdapter that is the problem.

--- End quote ---

Yes, this is the issue.

stahta01:
I still have to apply this wx2.9.1 patch before I can test building against wxWidgets trunk.

Note: I gave up over a month ago on fixing the wxDialogLayoutAdapter problem; will let a C++ expert work on it.

I have decided to just use wxWidgets 2.9 without STC in it; till someone else fixes the issue.
(This assumes I can get that method to work.)

Edit: I forgot I stopped working on Code::Blocks trunk and started just using wxProp/Debug branch a few months back. My Code::Blocks trunk was many months old.

Tim S.

roxlu:
Just a little note, I've tried to compile C::B against wxWidgets 2.9 on Mac 10.6 as well and it did not compile either... But I heard C::B does not intend to compile to 2.8

roxlu

stahta01:
Possible patch hand edited so might not apply right.

Tim S.


--- Code: ---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(); }

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version