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

Custom Tray Menu doesnt work on MacOSX #39

Open
TheAifam5 opened this issue Jul 20, 2016 · 2 comments
Open

Custom Tray Menu doesnt work on MacOSX #39

TheAifam5 opened this issue Jul 20, 2016 · 2 comments

Comments

@TheAifam5
Copy link

NW.JS Version: v0.15.4
NW.JS Commit hash: 63bc85a-0fc8753-3ee2c58-8655cb9

/Users/theaifam5/Desktop/Test/custom-tray-menu/custom_tray_menu.js:3
var gui = global.window.nwDispatcher.requireNwGui();
                                    ^
TypeError: Cannot read property 'requireNwGui' of undefined
    at Object.<anonymous> (/Users/theaifam5/Desktop/Test/custom-tray-menu/custom_tray_menu.js:3:37)
    at Module._compile (module.js:565:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:482:32)
    at tryModuleLoad (module.js:441:12)
    at Function.Module._load (module.js:433:3)
    at Module.require (module.js:492:17)
    at require (internal/module.js:20:19)
    at self.require (<anonymous>:11:26)

Buttons also doesn't work.

@joeblew99
Copy link

joeblew99 commented Aug 21, 2016

I just tried this and got the same error.

i was following the tutorial here:
https://github.com/nwjs/npm-installer

x-MacBook-Pro:nw-sample-apps apple$ "node_modules/.bin/nw" custom-tray-menu

/Users/apple/workspace/go/src/bitbucket.org/gedw99/md/try/nwjs/nw-sample-apps/custom-tray-menu/custom_tray_menu.js:3
var gui = global.window.nwDispatcher.requireNwGui();
                                    ^
TypeError: Cannot read property 'requireNwGui' of undefined
    at Object.<anonymous> (/Users/apple/workspace/go/src/bitbucket.org/gedw99/md/try/nwjs/nw-sample-apps/custom-tray-menu/custom_tray_menu.js:3:37)
    at Module._compile (module.js:565:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:482:32)
    at tryModuleLoad (module.js:441:12)
    at Function.Module._load (module.js:433:3)
    at Module.require (module.js:492:17)
    at require (internal/module.js:20:19)
    at self.require (<anonymous>:11:26)

@joshplant
Copy link
Contributor

I've created a new Tray Menu app example, which should solve this problem. I was having similar problems on Windows and Ubuntu, and those problems are fixed with my version. Please see PR #41.

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