I started working with the newest wxWidgets release (2.6.2) a few days ago and compiled the latest Code::Blocks CVS with it. I noticed the Build target ComboBox in the toolbar wasn't working as it should and trying to find the reason for it I found in the changes file this little thingy:
Quote from: config file for wxWidgets 2.6.2- wxChoice and wxComboBox::GetSelection() now returns completed selection, added a new GetCurrentSelection() function having the old behaviour.
Searching for version macros I found wxCHECK_VERSION and I'm proposing to use it:
#if wxCHECK_VERSION(2, 6, 2)
m_TargetIndex = m_ToolTarget->GetCurrentSelection() - (m_HasTargetAll ? 1 : 0);
#else
m_TargetIndex = m_ToolTarget->GetSelection() - (m_HasTargetAll ? 1 : 0);
#endifThat's from plugins/compilergcc/compilergcc.cpp line 1821 if you wonder.
It might be added somewhere else too... you're the ones who know the whole source.
Strange, this isn't documented in the manuals.... :?
Quote from: mispuntStrange, this isn't documented in the manuals.... :?
I just checked the help file and it'sn't commented in wxComboBox, but it's in wxChoice. Anyway, the list of changes is
here
I looked to it, and it seems that there are very much places where it has to be added. Just search for GetSelection and you will find a lot of places where it is found :?
I will work on this tommorow evening.
Yep, there's a lot, but it seems like just a few need to be replaced (only those called for wxComboBox and wxChoice).
Anyway, nice to know you'll work on it.
Strange, when using XRC files there has nothing to be changed... only the toolbar combobox was "corrupt" all others (I tested a lot of them) seems to be working...
The toolbar combobox is working to now.
Quote from: mispunt
The toolbar combobox is working to now.
i can confirm that, now only the
* the Project pane's split-window position isn't restored *
Bug is left with using wx262.
Quote from: tiwagi can confirm that, now only the
* the Project pane's split-window position isn't restored *
Bug is left with using wx262.
After a few hours trying to kill that bug I've got a solution that is working.
Now I need somebody to test it with versions other than 2.6.2 and, if it works well, then somebody to commit it.
Almost 2 months knowing this bug and nobody worked on it :shock:
Anyway, it's the only bug for 2.6.2 I know that needed to be fixed.
Now everybody would be encouraged to move to this version :)
[attachment deleted by admin]
Ok, found the first situation where it doesn't work fine: Closing the Management dock and opening it again won't restore the splitter.
Damn, I was this --><-- close!
Perhaps this has to do with wxDockit, too... maybe the windows are re-created and the information regarding the last splitter position is lost. We may need some temporary storage for the positions... but i wouldn't know where to place them.
Maybe wxDockIt has some event handlers we can attach?
So... you taking care of that? :)
i don't know, we need more testing... i'm just making wild guesses. Also, I don't have wx2.6.2 on my machine, and well, you already got it and have been working on it... :)
Maybe you can try this: IIRC, the splitter position is saved when the splitpanel is deleted. How about saving it ALSO, whenever you close the management dock?
Well, it seems the way to solve will be doing something like that in wxSmith (haven't checked it yet). It uses a splitter, it's added as a tab in the Management dock, saves and restores position and WORKS!
have there been more efforts to fix this issue? Here's a patch for a combobox I noticed that have this issue.
[attachment deleted by admin]
here's a more complete patch. Seems to fix all the issues I've noticed (in the compiler settings dialog). There are a number of other combobox getSelection calls though, I'm not sure if they need the same fix.
[attachment deleted by admin]