-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Uncaught TypeError: Cannot read property 'TouchBarButton' of undefined #45
Comments
Cannot reproduce with haxe 4-rc.5.
|
hmmm interesting, thanks for checking.. I'm also running: I'm not sure what other variables might be at play. What version of node and electron runtime are you using? |
linux x64 Are you sure using the touchbar api from electron's main process ? |
Ok, I think I know the cause of the issue.
The issue is that BrowserWindow now internally references TouchBar.
This use to be Dynamic
I know BrowserWindow is in the 'main' package, but considering you can have access to it through Remote.getCurrentWindow(); it would be nice if referencing it didn't cause a runtime error right? |
I've been looking at a work around today, however the only solution I've found is to revert to
The main issue is that within the TouchBar extern there are sub extern classes that are initialized through TouchBar
js output
So because
Any thoughts? |
It should work with |
Oh yes.. that's a good point.. just tested |
This seems to be resolved with electron v7.* but currently i am unable to update cause of another issue (#46). |
Hey there
after upgrading the latest version of hxelectron I'm getting the following error:
Science.js:7539 Uncaught TypeError: Cannot read property 'TouchBarButton' of undefined
It seems to be a result of electron.main.TouchBar, in particular where jsRequire is being used with the second param being TouchBar.TouchBarButton
eg:
and as seem once compiled to js
Deleting the TouchBar extern resolves the issue, but it would be good to have an official.. Any ideas on how to resolve?
The text was updated successfully, but these errors were encountered: