Author Topic: INCOMPATIBILITIES between wx2.4 and wx2.6  (Read 22768 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
INCOMPATIBILITIES between wx2.4 and wx2.6
« on: May 27, 2005, 05:49:05 pm »
OK, the thread's open. Rants welcome :)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #1 on: May 27, 2005, 06:16:38 pm »
First issue to tackle: The black background in wxnotebook icons under wx2.6. I recall reading something about styles in the wxWidgets manual (or did it get fixed already? )

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #2 on: May 27, 2005, 06:30:39 pm »
so you won't get to disurage rickg22.

I here read.  But sorry can't help! Work on gentoo know just came to lok on the wiki for the artical

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #3 on: May 27, 2005, 06:31:01 pm »
so you won't get to disurage rickg22.

I here read.  But sorry can't help! Work on gentoo know just came to lok on the wiki for the artical

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #4 on: May 28, 2005, 02:59:10 pm »
hay rickg22 could you please add these 2 files to code::blocks 2.6.0 cbp in cvs

startherepage.cpp

it missing

delete tinyxml.cpp stuff from it.

change in editormaneger.h

void EditorManager::OnPageChanging(wxComandEvent & event)
void EditorManager::OnPageChanged(wxCommandEvent& event)

to void EditorManager::OnPageChanging(wxNotebookEvent& event)
void EditorManager::OnPageChanged(wxNotebookEvent& event)

and do the nessary change in editormaneger.cpp

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #5 on: May 28, 2005, 02:59:51 pm »
sorry i ment 1 file not 2

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #6 on: May 28, 2005, 04:06:10 pm »
*starts to wonder if this thread was a good idea* :?

OK first, why do i need to delete the tinyxml stuff? Do I replace it with what?
Second, is that change in EditorManager necessary for all versions or just for 2.6? Will it break with 2.4?

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #7 on: May 29, 2005, 02:45:23 pm »
Some one changed  tiny xml to use dll and the cpp file no long in use and cuases it to not to compile.

the change for editormaneger.cpp is also nessary for it to compile.   For some reason that i don't understand it did not like wxCommandEvent in wxwidget 2.6.0 so i changed it to wxNotebookEvent wich is the type of even it is.  I tryed compile codeblock with wxwidget 2.4 and it still work in window but have no way of telling if it break anything in linux but this minor change there no reson it sould.

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #8 on: May 29, 2005, 02:49:53 pm »
These are just stander changes need to compile the latest cvs  for codeblock(wx2.6.0).  How are you getting it to compile with out it in order to try to solve the problem with the icon?

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #9 on: May 29, 2005, 03:02:23 pm »
Just a little note I spent all yesterday working on trying to get samba runing in colinux so i can tranfer my wxwidget source code to it.  I just know relised that The window version has problem two so i be post more here shortly and looking into thing.

Offline frog-o

  • Multiple posting newcomer
  • *
  • Posts: 61
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #10 on: May 29, 2005, 03:15:05 pm »
there probbly a better way then deleteing the .cpp files looking at the main soucres of 2.4 He did not do this.  I have to use winmege and figure out what mandrave is doing here.  I just know that this work at it made seence to me at the time but why he did not do it in the 2.4 i don't know I look into it.  If you reading this madrave would you mind inlighten me?

DreadNot

  • Guest
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #11 on: June 09, 2005, 09:14:29 am »
I've compiled with wx2.6.1.

Problem 1: In the Workspace area I see no workspace/project tree displayed.  Its there!  I just can't see it!  It is invisible!!!  I can right-click on items in the tree in their approximate location and a get the popup menus!  What a cruel trick to play on me!  Who set the color codes for this? :D The Symbol tree appears OK.  No Watches tree since I'm not debugging.  I'm also compiling wxSmith.  The Resources tree seems OK so far for what it is.

NOTE: I'll get memory exceptions out of nowhere if I let the application sit long enough after opening a project.  Maybe the thread to display the workspace/project tree is failing somehow!?

Problem 2: I'm assuming that with the notebook version, the Min/Restore/Close triplet buttons for the file are missing.  In the old system, I could "sometimes" get them after screwing around with the display (minimizing, then maximizing, etc).  Should the notebook have
  • buttons on the file tabs? I can right click in the file area to close.
Problem 3: When I try to minimize the application from a maximized window, the application gives a memory exception and crashes.  When I minimize from a non-maximized (restored) window, there is no fault.

Other: I still get the Run... problem (must debug before I can run--run without doing one initial debug causes a memory exception).

So far, these are the only problems I've encountered.  Is there anything else specifically I should be looking for?

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #12 on: June 09, 2005, 10:47:11 am »
A minor problem, perhaps it is a problem at my site.
I don't get the application icon.
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

DreadNot

  • Guest
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #13 on: June 09, 2005, 12:43:30 pm »
I forgot to mention I'm getting the following on the C::B compile under wx2.6.1:
Quote

sdk\editormanager.cpp: In constructor `EditorManager::EditorManager(wxWindow*)':
sdk\editormanager.cpp:124: warning: `__comp_ctor' is deprecated (declared at ../../wxWidgets/wxWidgets-2.6.1/include/wx/sizer.h:788)
sdk\editormanager.cpp: In member function `void EditorManager::ActivateNext()':
sdk\editormanager.cpp:443: warning: comparison between signed and unsigned integer expressions
sdk\editormanager.cpp: In member function `int EditorManager::FindPageFromEditor(EditorBase*)':
sdk\editormanager.cpp:644: warning: comparison between signed and unsigned integer expressions

I don't know if this affects the problems above.
(Copied from Development->"try compil CodeBlocks-wx2.6.0.cbp")

DreadNot

  • Guest
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #14 on: June 11, 2005, 12:39:13 am »
Well, I've been trying to track Problem 1 above.  My endevor is showing that it is not with the wxSplitterWindow--this seems to work OK.  The problem seems to be with the ProjectManager's wxTreeCtrl.  But what is strange is that it works OK with the EditorManager's wxTreeCtrl.  I've "turned each off" leaving only one on (unsplit) and also swapped which split they are in.  Each time, the EditorManager's wxTreeCtrl functions properly while the ProjectManager's wxTreeCtrl doesn't (invisible).  I know that the ProjectManager's wxTreeCtrl is set to "Show"--it just doesn't.  Even when I don't set the EditorManager's wxTreeCtrl in a split window it shows in the wxSplitterWindow ( as it is still a child to the parent using Show() ).

It must have something to do with how the ProjectManager's wxTreeCtrl is constructed or having items added to it that somehow differs from the EditorManager's wxTreeCtrl.

Could it be that the EditorManager is adding a "sizer" to the notebook?
Code
Line 124: new wxNotebookSizer(m_pNotebook);

Should this be done in the Manager class instead? (and obviously not using the depreciated method in wx2.6.1)

Any ideas?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #15 on: June 11, 2005, 12:47:24 am »
Why not try adding a sizer to it? :) You don't lose anything.

DreadNot

  • Guest
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #16 on: June 11, 2005, 01:41:25 am »
The EditorManager's wxNotebook is for the editor--I don't think its related to the problem.

Manager holds a wxSplitPanel (a C::B class) which holds a wxSplitterWindow.
EditorManager and ProjectManager both call the global Manager for the wxSplitPanel which in turn provides the wxSplitterWindow.  Each adds their own wxTreeCtrl to the wxSplitterWindow.

I think the problem is specifically with the ProjectManager's wxTreeCtrl, but I am confused as to why?  They approach content differently--adding items, building, rebuilding, ext.--but they are similar.

DreadNot

  • Guest
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #17 on: June 20, 2005, 10:03:19 pm »
I've recompiled with a current CVS update of HEAD.  Here are the wx2.6.1 incompatabilities so far.

I'm getting a compile error for wxHandleFatalExceptions():
Quote
src\app.cpp: In member function `virtual bool CodeBlocksApp::OnInit()':
src\app.cpp:214: error: `wxHandleFatalExceptions' undeclared (first use this function)
src\app.cpp:214: error: (Each undeclared identifier is reported only once for each function it appears in.)

I seems that "wxHandleFatalExceptions()" is only defined when "wxUSE_ON_FATAL_EXCEPTION" is set to 1.  Its only supposed to be used when the compiler "supports Win32 structured exception handling (currently only VC++ does)" .  Its defined in wx/msw/chkconf.h as follows (due to the use of mingw):
Code
#if !defined(_MSC_VER) && \
    (!defined(__BORLANDC__) || __BORLANDC__ < 0x0550)
    #undef wxUSE_ON_FATAL_EXCEPTION
    #define wxUSE_ON_FATAL_EXCEPTION 0
...

To check in app.cpp, I've changed/added the code as follows:
Code
bool CodeBlocksApp::OnInit()
{
    m_pSplash = 0;
#if wxUSE_ON_FATAL_EXCEPTION // <-- added
    wxHandleFatalExceptions(true);
#endif // <-- added
    if(!LoadConfig())
        return false;

Also getting warnings in EditorManager:
Quote
sdk\editormanager.cpp: In constructor `EditorManager::EditorManager(wxWindow*)':
sdk\editormanager.cpp:124: warning: `__comp_ctor' is deprecated (declared at ../../wxWidgets/wxWidgets-2.6.1/include/wx/sizer.h:788)
sdk\editormanager.cpp: In member function `void EditorManager::ActivateNext()':
sdk\editormanager.cpp:443: warning: comparison between signed and unsigned integer expressions
sdk\editormanager.cpp: In member function `int EditorManager::FindPageFromEditor(EditorBase*)':
sdk\editormanager.cpp:643: warning: comparison between signed and unsigned integer expressions

DreadNot

  • Guest
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #18 on: June 20, 2005, 10:27:46 pm »
Due to the DLLIMPORT changes in editorbase.h, anytime editorbase.h is directly included (such as in wxSmith), the including file must also include settings.h before editorbase.h in order to properly define DLLIMPORT.

Having editorbase.h include settings.h directly may be a cleaner solution (maybe?)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #19 on: June 20, 2005, 10:35:43 pm »
Quote from: DreadNot
I seems that "wxHandleFatalExceptions()" is only defined when "wxUSE_ON_FATAL_EXCEPTION" is set to 1. Its only supposed to be used when the compiler "supports Win32 structured exception handling (currently only VC++ does)" . Its defined in wx/msw/chkconf.h as follows (due to the use of mingw):

I noticed it too. The funny thing is that under wx2.4 this function is defined and working as expected with MinGW. Under Linux (gcc) too. So it seems that gcc works with it. I don't know.

Quote from: DreadNot
Having editorbase.h include settings.h directly may be a cleaner solution (maybe?)

Yes, probably.

Yiannis.
Be patient!
This bug will be fixed soon...

DreadNot

  • Guest
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #20 on: June 20, 2005, 11:00:58 pm »
Apparently, a patent exists for SEH.  Therefore, it may have been changed due to this:
http://www.builderau.com.au/program/work/0,39024650,39188400,00.htm

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #21 on: June 21, 2005, 11:18:07 am »
Quote from: DreadNot
Having editorbase.h include settings.h directly may be a cleaner solution (maybe?)

Added it in CVS.

Yiannis.
Be patient!
This bug will be fixed soon...

DreadNot

  • Guest
Re: INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #22 on: August 09, 2005, 10:01:54 am »
I've compiled with wx2.6.1.

Problem 1: In the Workspace area I see no workspace/project tree displayed.  Its there!  I just can't see it!  It is invisible!!!  I can right-click on items in the tree in their approximate location and a get the popup menus!  What a cruel trick to play on me!  Who set the color codes for this? :D The Symbol tree appears OK.  No Watches tree since I'm not debugging.  I'm also compiling wxSmith.  The Resources tree seems OK so far for what it is.

NOTE: I'll get memory exceptions out of nowhere if I let the application sit long enough after opening a project.  Maybe the thread to display the workspace/project tree is failing somehow!?

Problem 2: I'm assuming that with the notebook version, the Min/Restore/Close triplet buttons for the file are missing.  In the old system, I could "sometimes" get them after screwing around with the display (minimizing, then maximizing, etc).  Should the notebook have
  • buttons on the file tabs? I can right click in the file area to close.
Problem 3: When I try to minimize the application from a maximized window, the application gives a memory exception and crashes.  When I minimize from a non-maximized (restored) window, there is no fault.

Other: I still get the Run... problem (must debug before I can run--run without doing one initial debug causes a memory exception).

So far, these are the only problems I've encountered.  Is there anything else specifically I should be looking for?

UPDATE:
I've compiled with wx2.6.1 with the patch.
Problem 1 seems to be gone!
Problem 2 still exists--I think I've read in another post that this is a wx design issue with wxNotebook and that we may need to create a workaround.  This seems like a missed or undocumented setting for the tab.
Problem 3 seems to be gone!
I'm guessing Other is gone as well.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #23 on: August 09, 2005, 05:51:22 pm »
Dreadnot: On the VERSION_1_0 branch, I've added a "close button". It's in the environment settings, but it's very ugly. It was the only way I could do it, tho.

DreadNot

  • Guest
Re: INCOMPATIBILITIES between wx2.4 and wx2.6
« Reply #24 on: August 10, 2005, 05:14:21 pm »
Yes.  I notice that in another thread.  I also responded with a possible solution following the track Yannis took in trying to put the button in the tab area.  See http://forums.codeblocks.org/index.php/topic,633.msg4646.html#msg4646 for more.

This seems to be a dead thread (at least for me) since all new development is currently using wx2.6+ and the major incompatability problems seems to have been resolved.  I still get the warnings for comparing signed and unsigned integers in editormanager.cpp