www.digitalmars.com         C & C++   DMDScript  

c++.wxwindows - wx 2.4.2 - which version to get

reply eliot blennerhassett.gen.nz writes:
I see from this list (and have experienced) some problems with 2.4.2 downloaded
as installer.   

Would you recommend that I use CVS instead? - I don't really want to be at the
bleeding edge of wxWin development though.
I.e. should I go for a particulary CVS branch?

OR would you recommend that I patch the standard 2.4.2 according to bugfixes
posted on this list?

thanks

Eliot
Feb 17 2004
parent reply Arjan Knepper <arjan ask.me> writes:
You are also able to retrieve the 2.4.2 from the CVS. (Called a 'branch' 
named WX_2_4_BRANCH)

I would suggest you try this first.

Arjan

eliot blennerhassett.gen.nz wrote:
 I see from this list (and have experienced) some problems with 2.4.2 downloaded
 as installer.   
 
 Would you recommend that I use CVS instead? - I don't really want to be at the
 bleeding edge of wxWin development though.
 I.e. should I go for a particulary CVS branch?
 
 OR would you recommend that I patch the standard 2.4.2 according to bugfixes
 posted on this list?
 
 thanks
 
 Eliot
 
 
Feb 18 2004
parent reply Eliot <eblennerhassett audioscience.com> writes:
Arjan Knepper wrote:

 You are also able to retrieve the 2.4.2 from the CVS. (Called a 'branch' 
 named WX_2_4_BRANCH)
 
 I would suggest you try this first.
 
OK, I have done that and the libraries compile OK. The minimal sample compiles OK, but the controls sample crashes (access violation I think). (Compiler version 8.38n, Windows XP) I guess I'd better figure out how to run the debugger on an application built using a makefile... My CD arrived in the mail a couple of days ago - do I need to upgrade the compiler as well? - Eliot
Feb 18 2004
parent reply Arjan Knepper <arjan ask.me> writes:
Eliot wrote:

 Arjan Knepper wrote:
 
 You are also able to retrieve the 2.4.2 from the CVS. (Called a 
 'branch' named WX_2_4_BRANCH)

 I would suggest you try this first.
OK, I have done that and the libraries compile OK. The minimal sample compiles OK, but the controls sample crashes (access violation I think).
Yes a access violation because the wxWindows holds a const reference to a temporary object and uses the reference after the object gets destroyed. Change line 360 in src/msw/tooltip.cpp like below: ----------------------------<snip>----------------------------------------- #if !defined(__WXUNIVERSAL__) // and all of its subcontrols (e.g. radiobuttons in a radiobox) as well wxControl *control = wxDynamicCast(m_window, wxControl); if ( control ) { // const wxArrayLong& subcontrols = control->GetSubcontrols(); const wxArrayLong subcontrols = control->GetSubcontrols(); size_t count = subcontrols.GetCount(); for ( size_t n = 0; n < count; n++ ) { int id = subcontrols[n]; ----------------------------<snip>----------------------------------------- A few days ago Matthew Wilson reported the same kind of problem which seems to be supposed to work this way. Arjan.
Feb 19 2004
next sibling parent julian anthemion.co.uk writes:
I've just been alerted to this on wx-dev and have made this change
in wxWindows 2.4 and 2.5 CVS. Thanks!

Julian Smart

In article <c12g6c$9vf$1 digitaldaemon.com>, Arjan Knepper says...
Yes a access violation because the wxWindows holds a const reference to 
a temporary object and uses the reference after the object gets destroyed.

Change line 360 in src/msw/tooltip.cpp like below:
----------------------------<snip>-----------------------------------------
#if !defined(__WXUNIVERSAL__)
     // and all of its subcontrols (e.g. radiobuttons in a radiobox) as well
     wxControl *control = wxDynamicCast(m_window, wxControl);
     if ( control )
     {
//      const wxArrayLong& subcontrols = control->GetSubcontrols();
         const wxArrayLong  subcontrols = control->GetSubcontrols();
         size_t count = subcontrols.GetCount();
         for ( size_t n = 0; n < count; n++ )
         {
             int id = subcontrols[n];
Feb 19 2004
prev sibling parent Eliot <eblennerhassett audioscience.com> writes:
Arjan Knepper wrote:

 Change line 360 in src/msw/tooltip.cpp like below:
 //      const wxArrayLong& subcontrols = control->GetSubcontrols();
         const wxArrayLong  subcontrols = control->GetSubcontrols();
Thanks! That solved it. Now I'm going to start a new thread with my question about debugging.. regards Eliot
Feb 19 2004