Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ridge on January 22, 2017, 03:49:54 am
-
CodeBlocks builds and runs (with some patches that have been posted in the forum) but the wxChoice items don't seem to show up (see attachment).
Does anyone have a solution yet?
CodeBlocks: v.16.01
OS: OSX 10.11.6 (El Capitan)
Compiler: g++ (clang compiler installed with Xcode command line tools)
wxWidgets: v.3.1.0
Thanks!
-
I don't think so. Someone with a mac an free time should try to debug it. I have a mac at home, but no free time at the moment. To be frank, I'm scared to build it on a mac, because there would be too many bugs I'd have to fix and I have no time to do it. :)
Also I think this was recently discussed somewhere either on the forum or in the ticket system. Don't remember where.
-
Maybe try it with wx 3.0 ?
Yves
-
I just installed wxmac (which reports as wxwidgets 3.0).
Still the same - wxChoice items do not appear on the toolbars.
-
I just installed wxmac (which reports as wxwidgets 3.0).
Still the same - wxChoice items do not appear on the toolbars.
If wxGTK is a choice can you try that.
Tim S.
-
Yeah, I've also tried wxWidgets-2.8. The problem does not appear to be with wxWidgets.
I can build an example wxWidgets project - wxChoice works just fine on Mac OS X (see attached).
It seems that the problem is in CodeBlocks...huh?
Any pointers?
-
The problem might be that we're building the toolbars using xrc files and not with code.
Probably there is something broken with the xrc stuff.
These are the files used for the compiler toolbar:
./plugins/compilergcc/resources/compiler_toolbar.xrc
./plugins/compilergcc/resources/compiler_toolbar_16x16.xrc
The code for the toolbar creation is in CompilerGCC::BuildToolBar method.
Can you try them in your sample?
Also there is no point using wx2.8. wx3.0 is the only thing that is going to work on osx. wx2.8 is known to be really buggy.
-
Thanks oBFusCATed.
It appears that there is a custom control ("wxToolBarAddOn") that, for some reason,
doesn't play nice with wxChoice on Mac OS X.
Ok, I'll take a look at the BuildToolBar method...
My sample works on all versions of wxWidgets that I've tried.
However, I agree, it only make sense to use >= wx3.0.
wx3.1 doesn't seem to be any worse than wx3.0 and perhaps
has some bug fixes - any reason not to stick with wx3.1?
-
So the class of the toolbar doesn't play well with the wxchoice? This should be researched even further.
About wx3.1 - it is a development version. I'm using it to test things, but we need to support wx3.0 for most of the linux distros, so we cannot switch to wx3.1...
-
So it seems the toolbar loading code is in xtra_res.cpp. Can you try to debug it and see what call is failing on OSX?
-
Actually, I'm not sure that a call is failing. When I increase the width of the wxChoice object in compiler_toolbar_16x16.xrc, the toolbar extends accordingly. Also, when I move the wxChoice between the other "tools", it takes up the correct amount of space. So, the object is apparently "there" but just not visible.
UPDATE: I can replicate the behavior in my sample by calling wxChoice_instance->Show(false).
So, how could visibility get set to false?
-
It appears that there is a custom control ("wxToolBarAddOn") that, for some reason,
doesn't play nice with wxChoice on Mac OS X.
Ok, I'll take a look at the BuildToolBar method...
FYI:
This custom control does not works quite well under Windows with wx 3.1(trunk), see here: toolbar bottom edge is not shown corectly under C::B build with wx git master (http://forums.codeblocks.org/index.php/topic,20938.0.html)
-
Thanks for the link ollydbg. Yes, I see that there are toolbar layout issues in Windows.
There are some layout issues in OS X, too, though not the same height issues as on Windows.
However, I notice (although only the top edge is showing in the link you provided) that the wxChoice items are visible.
I attached a screen shot for OS X in the original post, for reference. Note that the toolbars that are supposed to contain
wxChoice items are 3 - 8 pixels taller. I think this is a separate issue. On OS X, the wxChoice
items are not visible in the custom toolbars - but they are visible in other dialogs.