Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS Building errors #88

Open
BushTrain460615 opened this issue Nov 22, 2022 · 22 comments
Open

MacOS Building errors #88

BushTrain460615 opened this issue Nov 22, 2022 · 22 comments

Comments

@BushTrain460615
Copy link

MacOS errors on 00-Showcase
https://github.com/BushTrain460615/stupid-crash-reporter-errors/blob/main/errors.txt

@ghost
Copy link

ghost commented Jun 3, 2023

i also do get the same error on an m1 macbook

@x-0D
Copy link

x-0D commented Dec 3, 2023

Same error.

ld: Undefined symbols:
  wxOnAssert(char const*, int, char const*, char const*, wchar_t const*), referenced from:
      hx::widgets::ArrayString_obj::item(int) in edf3cd3c_ArrayString.o
      wxNavigationEnabled<wxListCtrlBase>::wxNavigationEnabled() in edf3cd3c_ListCtrl.o
      hx::widgets::CalendarCtrl_obj::get_date() in edf3cd3c_CalendarCtrl.o
      hx::widgets::__CalendarCtrl_objget_date(hx::Object*) in edf3cd3c_CalendarCtrl.o
      hx::widgets::CalendarCtrl_obj::__Field(String const&, hx::PropertyAccessMode) in edf3cd3c_CalendarCtrl.o
      hx::widgets::CloseEvent_obj::veto(hx::Null<bool>) in edf3cd3c_CloseEvent.o
      hx::widgets::__CloseEvent_objveto(hx::Object*, Dynamic const&) in edf3cd3c_CloseEvent.o
      ...
  wxOnAssert(char const*, int, char const*, char const*, char const*), referenced from:
      wxEventFunctorMethod<wxEventTypeTag<wxNavigationKeyEvent>, wxNavigationEnabled<wxListCtrlBase>, wxNavigationKeyEvent, wxNavigationEnabled<wxListCtrlBase>>::operator()(wxEvtHandler*, wxEvent&) in edf3cd3c_ListCtrl.o

@ianharrigan
Copy link
Member

what versions of haxeui-core, haxeui-hxwidgets, hxWidgets and wxWidgets?

@x-0D
Copy link

x-0D commented Dec 3, 2023

haxeui-core: [1.6.0]
haxeui-hxwidgets: [1.6.0]
hxcpp: [4.3.2]
hxWidgets: [1.11.0]

and
wxwidgets 3.2.4

trying to compile on MacBook Pro M2

@x-0D
Copy link

x-0D commented Dec 3, 2023

FOUND FIX FOR THIS!!!
i added -D HXCPP_ARM64 in hxwidgets.hxml and it compiles successfully!

-cp src
-main Main

-lib haxeui-core
-lib haxeui-hxwidgets
-lib hxWidgets

-D ABI=-MD
-D WXSTATIC
-D HXCPP_ARM64
-cpp build/hxwidgets

@ianharrigan
Copy link
Member

FOUND FIX FOR THIS!!!

Great! yeha, its weird how hxcpp doesnt default to 64bit tbh

haxeui-core: [1.6.0]
haxeui-hxwidgets: [1.6.0]
hxcpp: [4.3.2]
hxWidgets: [1.11.0]

FYI, you almost certainly want to be using the git versions of haxeui-* and hxWidgets... 1.6 is EXTREMELY old. Although, if its compiling maybe for now "dont touch anything", but just something to keep in mind :)

@x-0D
Copy link

x-0D commented Dec 3, 2023

FYI, you almost certainly want to be using the git versions of haxeui-* and hxWidgets... 1.6 is EXTREMELY old. Although, if its compiling maybe for now "dont touch anything", but just something to keep in mind :)

I discovered haxe language and hxwidgets a few hours ago. is there guide how to use git versions or how to make basic actual set-up?

@ianharrigan
Copy link
Member

You do:

haxelib git haxeui-core https://github.com/haxeui/haxeui-core
haxelib git haxeui-hxwidgets https://github.com/haxeui/haxeui-hxwidgets
haxelib git hxWidgets https://github.com/haxeui/hxWidgets

@x-0D
Copy link

x-0D commented Dec 5, 2023

after installing haxeui from git, i having issues with compiling now.

wxWidgets version detected as 3.2.4
/usr/local/lib/haxe/lib/haxeui-core/git/haxe/ui/macros/ComponentMacros.hx:674: unsupported {pos: #pos(src/MainView.hx:5: lines 5-10), expr: ECall({pos: #pos(src/MainView.hx:5: characters 16-34), expr: EField({pos: #pos(src/MainView.hx:5: characters 16-20), expr: EConst(<...>)},registerEvent,Normal)},[{pos: #pos(src/MainView.hx:5: characters 35-43), expr: EConst(CString(<...>,<...>))},{pos: #pos(src/MainView.hx:5: lines 5-10), expr: EFunction(FAnonymous,{ret: <...>, params: <...>, expr: <...>, args: <...>})}])}
/usr/local/lib/haxe/lib/haxeui-core/git/haxe/ui/containers/dialogs/Dialog.hx:75: characters 22-30 : haxe.ui.containers.dialogs.Dialog has no field closable

@ianharrigan
Copy link
Member

Whoops, fixed now in latest git haxeui-hxwidgets

@x-0D
Copy link

x-0D commented Dec 5, 2023

Here are bugs with default dark theme in macos. main.css has fully commented colors/shadows/etc. when i go light mode, text appears, but Side items menu keeps dark (with black text on it)
main.css.txt

Light Mode Light mode Switched from Dark mode After relaunch in Dark Mode

@ianharrigan
Copy link
Member

Could be a wxWidgets thing, if you fully restart the application does it persist?

@x-0D
Copy link

x-0D commented Dec 6, 2023

As you can see, restarting application (in light mode) should fix that. If i restart in dark mode, problem persists. You can understand who is who by text color - in dark mode text is white.

@x-0D
Copy link

x-0D commented Dec 6, 2023

As i know, there's https://docs.wxwidgets.org/3.0/classwx_system_settings.html which can be used to get system colors. I used it when tried to write code editor implementation in wxpython, so my app follows system colors (even Linux custom theming colors). If i find that code, i'll share it.

@ianharrigan
Copy link
Member

You can use system colours in haxeui stylesheets, but im not sure why its happening in the first place tbh... i dont think haxeui should be setting any colours... unless maybe its just the responsive demo... ... ... ... ?

@ianharrigan
Copy link
Member

Ah, i know whats happening... there is another component in haxeui called "sidebar"... and i think its picking up the styles for that. To confirm can you rename the sidebar in the demo to "sidebar2" (or something), and update the css accordingly... pretty sure it will go away.

@x-0D
Copy link

x-0D commented Dec 6, 2023

unless maybe its just the responsive demo... ... ... ... ?

I removed all colours from css. You can examine my main.css attached to previous message. (As main.css.txt)

I'll try to rename sidebar to sidebar2, but i think it doesn't help with all white themed except sidebar, while dark theme enabled.

@x-0D
Copy link

x-0D commented Dec 9, 2023

Okay, after renaming sidebar to sidebar2 correct theming is gone.
Dark theme enabled:
Dark theme enabled
Light theme enabled
Light theme enabled

@ianharrigan
Copy link
Member

ianharrigan commented Dec 9, 2023

can you just try and replace the whole of the main.xml with something simpler, like a button in a container, something like:

<vbox width="100%" height="100%">
    <button text="Button" />
</vbox>

I also noticed that the xml in the responsive demo has: background-color: white; in the root element, which is likely screwing things up also (https://github.com/haxeui/component-examples/blob/original/responsive/assets/main.xml#L1C81-L1C105)

These examples are pretty old and are in dire need to updates / rewrites.

They were also just meant as an example of a specific part of haxeui, not a base for a real application - which is why they arent going to take "dark mode" into account from the OS

@x-0D
Copy link

x-0D commented Dec 9, 2023

Dark Mode Fixed! Found it! there's css coloring inside responsive example xml. thank you for advice, i'll PR actualized responsive example files into examples repo.

@x-0D
Copy link

x-0D commented Dec 9, 2023

also renamed menu style to menu2. as you can see, there's problem with titlebar. items overflowed at the top of the layout after resizing. scrolling up doesn't help, this is already scrolled to top.
Снимок экрана 2023-12-09 в 22 58 36

@x-0D
Copy link

x-0D commented Dec 9, 2023

How to reproduce bug with top overflow:
launch app, try to scroll it from top and bottom, scroll to center, then try to resize. after scrolling position changed from initial to custom, resize brokes

UPD: try to resize using corner diagonal resizers, one-axis resizers are ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants