"Window" menu on MacOS

Hi, where does this menu come from ?

If I add a menubar, HaxeUI adds this first menu by default on MacOS.
How could I remove it ?

 <menubar id="mainMenu" width="100%" >
    <menu text="Menu 1">
.....

Note, it doesn’t appear on HTML5 (even if the menu doesn’t work at all, I only have the menu I asked for)

My guess is this is another wxwidgets “feature”… Ill see if there is a way to turn this off in hxWidgets - im not much of a mac user, but you are saying this isnt a standard “thing” on OSX, right?

EDIT: looks like this might be the flag, now i wonder how to get access to it: https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/osx/menu.h#L157

OK, that should be fixed now, you shouldnt see a “window” menu on mac anymore.

(git version of haxeui-hxwidgets, hxWidgets)

I have updated my haxelib with git versions and it’s still present…

perhaps because of this new error/warning:

Warning : Should be used in initialization macros only: haxe.macro.Compiler.define(PLATFORM_MAC)

Yeah, thats likely - what version of haxe are you using?

4.0.5, installed recently
the one available on haxe.org

does it also explain the other warnings I have from the beginning :

ld: warning: direct access in function xxxxxx

I have almost 10 of them, for several functions
(yes, I hate warnings, sorry :smile: )

added on https://bitbucket.org/WillNa/haxeui-bugs

but from what you said, it’s related to Haxe version, since I miss macro PLATFORM_MAC

1 Like

Thanks i think i know what ill do about this.

I think this should be fixed now in latest git versions. (as well as the warnings gone).

Let me know if that isnt the case

Cheers,
Ian

Hi,
unfortunately, with latest Github versions, menu crash the app…

0 Coherence-debug 0x000000010c3a0750 cpp::Pointer::reinterpret() + 16 (Pointer.h:249)
1 Coherence-debug 0x000000010c8d5993 hx::widgets::Window_obj::get_windowRef() + 211 (Window.cpp:1099)
2 Coherence-debug 0x000000010c8d581f hx::widgets::Window_obj::show(hx::Null) + 239 (Window.cpp:222)
3 Coherence-debug 0x000000010cd705d2 haxe::ui::backend::ComponentImpl_obj::createWindow(hx::ObjectPtrhx::widgets::Object_obj) + 7202 (ComponentImpl.cpp:459)

It breaks on ComponentImpl.hx / createWindow / line 162
if (_hideOnCreate == true) {
_hideOnCreate = false;
window.show(false);
} else {
–> here window.show(false);
_firstResize = true;
}

And warning are still there

ld: warning: direct access in function ‘wxStringToStringHashMap_wxImplementation_HashTable::HashCopy(wxStringToStringHashMap_wxImplementation_HashTable const&)’ from file ‘obj/darwin64-debug/cf4c4902_Globals.o’ to global weak symbol ‘wxStringToStringHashMap_wxImplementation_HashTable::CopyNode(wxStringToStringHashMap_wxImplementation_HashTable::Node*)’ from file ‘/usr/local/lib/libwx_baseu-3.1.a(baselib_log.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

perhaps due to my haxe version ?

same thing with latest version (4.1.1)

Called from hxcpp::__hxcpp_main
Called from Coherence::main Coherence.hx line 9
Called from haxe.ui.HaxeUIApp::ready haxe/ui/HaxeUIApp.hx line 23
Called from haxe.ui.HaxeUIApp::init haxe/ui/HaxeUIApp.hx line 52
Called from haxe.ui.HaxeUIApp::handlePreload haxe/ui/HaxeUIApp.hx line 60
Called from haxe.ui.backend.AppImpl::init haxe/ui/backend/AppImpl.hx line 79
Called from Coherence::main Coherence.hx line 10
Called from haxe.ui.HaxeUIApp::addComponent haxe/ui/HaxeUIApp.hx line 90
Called from haxe.ui.core.Screen::addComponent haxe/ui/core/Screen.hx line 40
Called from haxe.ui.core.Component::ready haxe/ui/core/Component.hx line 1078
Called from haxe.ui.backend.ComponentImpl::handleReady haxe/ui/backend/ComponentImpl.hx line 85
Called from haxe.ui.backend.ComponentImpl::handleReady haxe/ui/backend/ComponentImpl.hx line 85
Called from haxe.ui.backend.ComponentImpl::handleReady haxe/ui/backend/ComponentImpl.hx line 85
Called from haxe.ui.backend.ComponentImpl::handleReady haxe/ui/backend/ComponentImpl.hx line 81
Called from haxe.ui.backend.ComponentImpl::createWindow haxe/ui/backend/ComponentImpl.hx line 162
Critical Error: Uncatchable Throw: Null Object Reference
Illegal instruction: 4

Ah, i think tht makes sense actually, ill fix it tomorrow, if it was i think it is, its a dumb mistake :slight_smile:

Cheers,
Ian

PS: strange that the warning is still there though, do you have latest haxeui-*?

I now do a haxelib update before any dev session so yes, I have the latest version from Git (unless haxelib is broken…)

menu should be fixed now, and are you saying that the Window menu is still there now? Can you paste the warning again?

Ian

about the warnings:

ld: warning: direct access in function ‘wxNavigationEnabled::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/cf4c4902_ListCtrl.o’ to global weak symbol ‘wxNavigationEnabled::OnChildFocus(wxChildFocusEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_listctrlcmn.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxNavigationEnabled::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/cf4c4902_ListCtrl.o’ to global weak symbol ‘wxNavigationEnabled::OnFocus(wxFocusEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_listctrlcmn.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxNavigationEnabled::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/cf4c4902_ListCtrl.o’ to global weak symbol ‘wxNavigationEnabled::OnNavigationKey(wxNavigationKeyEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_listctrlcmn.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxNavigationEnabled<wxCompositeWindow >::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/cf4c4902_SpinCtrl.o’ to global weak symbol ‘wxNavigationEnabled<wxCompositeWindow >::OnChildFocus(wxChildFocusEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_spinctlg.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxNavigationEnabled<wxCompositeWindow >::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/cf4c4902_SpinCtrl.o’ to global weak symbol ‘wxNavigationEnabled<wxCompositeWindow >::OnFocus(wxFocusEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_spinctlg.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxNavigationEnabled<wxCompositeWindow >::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/cf4c4902_SpinCtrl.o’ to global weak symbol ‘wxNavigationEnabled<wxCompositeWindow >::OnNavigationKey(wxNavigationKeyEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_spinctlg.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxCompositeWindow::wxCompositeWindow()’ from file ‘obj/darwin64-debug/cf4c4902_SpinCtrl.o’ to global weak symbol ‘wxCompositeWindow::OnWindowCreate(wxWindowCreateEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_spinctlg.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxNavigationEnabled::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/8d9de584_wxownerdrawnpanel.o’ to global weak symbol ‘wxNavigationEnabled::OnChildFocus(wxChildFocusEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_panelcmn.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxNavigationEnabled::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/8d9de584_wxownerdrawnpanel.o’ to global weak symbol ‘wxNavigationEnabled::OnFocus(wxFocusEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_panelcmn.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxNavigationEnabled::wxNavigationEnabled()’ from file ‘obj/darwin64-debug/8d9de584_wxownerdrawnpanel.o’ to global weak symbol ‘wxNavigationEnabled::OnNavigationKey(wxNavigationKeyEvent&)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_panelcmn.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxStringToStringHashMap_wxImplementation_HashTable::HashCopy(wxStringToStringHashMap_wxImplementation_HashTable const&)’ from file ‘obj/darwin64-debug/cf4c4902_Globals.o’ to global weak symbol ‘wxStringToStringHashMap_wxImplementation_HashTable::CopyNode(wxStringToStringHashMap_wxImplementation_HashTable::Node*)’ from file ‘/usr/local/lib/libwx_baseu-3.1.a(baselib_log.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxStringToStringHashMap_wxImplementation_HashTable::HashCopy(wxStringToStringHashMap_wxImplementation_HashTable const&)’ from file ‘obj/darwin64-debug/cf4c4902_Globals.o’ to global weak symbol ‘wxStringToStringHashMap_wxImplementation_HashTable::GetBucketForNode(wxStringToStringHashMap_wxImplementation_HashTable*, wxStringToStringHashMap_wxImplementation_HashTable::Node*)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_containr.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxStringToStringHashMap_wxImplementation_HashTable::ResizeTable(unsigned long)’ from file ‘obj/darwin64-debug/cf4c4902_Globals.o’ to global weak symbol ‘wxStringToStringHashMap_wxImplementation_HashTable::GetBucketForNode(wxStringToStringHashMap_wxImplementation_HashTable*, wxStringToStringHashMap_wxImplementation_HashTable::Node*)’ from file ‘/usr/local/lib/libwx_osx_cocoau_core-3.1.a(corelib_containr.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function ‘wxStringToStringHashMap_wxImplementation_HashTable::clear()’ from file ‘obj/darwin64-debug/cf4c4902_Globals.o’ to global weak symbol ‘wxStringToStringHashMap_wxImplementation_HashTable::DeleteNode(_wxHashTable_NodeBase*)’ from file ‘/usr/local/lib/libwx_baseu-3.1.a(baselib_appbase.o)’ means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

OK, those arent haxe warnings, those are c++ warnings from wxWidgets itself, what version of wxWidgets are you using?

I installed it with brew
so, like you can see on the warnings, version 3.1

to be sure, I reinstalled it and it’s still 3.1, and I still have the warnings

3.1. what? .2?

It might be easier to download and build wxWidgets yourself from source (3.1.3 is the latest i think), its really straight forward on osx / linux:https://github.com/haxeui/hxWidgets#building-wxwidgets-from-source-linux--osx.

Either that or maybe live with the warnings or try to fix them somehow (maybe clang version isnt “right”).

There isnt much i can do about those c++ warnings as they are coming from wxWidgets itself.

Ian

EDIT: from here: https://www.wxwidgets.org/news/2019/10/wxwidgets-3.1.3-released/

  • Extended compiler (MSVS 2019) and platforms (macOS 10.14+) support.

Maybe that will get rid of the warnings? :man_shrugging:

Hi,
Based on wx-config --version, it’s already the 3.1.3 installed by brew :frowning: