Author Topic: wxComboBox @ wxWidgets 2.6.2  (Read 10359 times)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
wxComboBox @ wxWidgets 2.6.2
« on: October 02, 2005, 08:07:40 pm »
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:

Code
#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);
#endif

That'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.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #1 on: October 03, 2005, 12:24:31 am »
Strange, this isn't documented in the manuals.... :?
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #2 on: October 03, 2005, 01:58:29 am »
Quote from: mispunt
Strange, 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

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #3 on: October 04, 2005, 12:50:00 pm »
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.
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #4 on: October 04, 2005, 02:45:58 pm »
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.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #5 on: October 06, 2005, 12:35:13 pm »
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.
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #6 on: October 06, 2005, 01:19:59 pm »
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.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #7 on: November 22, 2005, 07:18:21 am »
Quote from: tiwag
i 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]

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #8 on: November 22, 2005, 04:25:33 pm »
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!

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #9 on: November 22, 2005, 05:36:20 pm »
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?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #10 on: November 22, 2005, 06:04:07 pm »
So... you taking care of that? :)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #11 on: November 22, 2005, 06:06:12 pm »
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?
« Last Edit: November 22, 2005, 06:10:09 pm by rickg22 »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #12 on: November 23, 2005, 03:16:13 am »
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!

basic

  • Guest
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #13 on: November 29, 2005, 09:36:56 am »
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]

basic

  • Guest
Re: wxComboBox @ wxWidgets 2.6.2
« Reply #14 on: November 29, 2005, 11:07:39 am »
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]