question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NW.js crashes when using Menubar in 0.63.0+

See original GitHub issue

si utilise le menubar, node webkit ouvre et ce ferme tout de suite

var nw = require(‘nw.gui’); var win = nw.Window.get(); var fs = require(‘fs’); var php = require(‘phpjs’); var path = require(‘path’); var chemin = path.resolve();

$(function() { $(“#version p:nth-child(1)”).append(process.versions[‘node-webkit’]); $(“#version p:nth-child(2)”).append(process.versions[‘node’]); $(“#version p:nth-child(3)”).append(process.versions[‘chromium’]);

// Create an empty menubar var menu = new nw.Menu({type: ‘menubar’});

// Create a submenu as the 2nd level menu var submenu = new nw.Menu(); submenu.append(new nw.MenuItem({ label: ‘Item A’ })); submenu.append(new nw.MenuItem({ label: ‘Item B’ }));

// Create and append the 1st level menu to the menubar menu.append(new nw.MenuItem({ label: ‘First Menu’, submenu: submenu }));

// Assign it to window.menu to get the menu displayed nw.Window.get().menu = menu;

});

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sysragecommented, May 21, 2022

I am also seeing this crash (0.64.1). The minimal repro is simply opening nw.exe by itself and entering the following into the console:

nw.Window.get().menu = new nw.Menu({ type: 'menubar' });

@rogerwang can you please take a look?

0reactions
rogerwangcommented, May 31, 2022

This is fixed in git and will be available in the next nightly build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React NW.js menubar setup crash - Stack Overflow
This appears to be a bug with the latest builds of NW.js and is not related to React. I can recreate the crash...
Read more >
Customize Menubar - NW.js Documentation
The first item of application menu shows nwjs instead of your-app-name. To fix it, you need to set the value of CFBundleName in...
Read more >
MathLive Changelog - CortexJS
When using the Chrome Device Toolbar to emulate a mobile device, typing on the physical keyboard resulted in duplicate input.
Read more >
Reported Bugs | Christoph Lange Weblog - WordPress.com
LibreOffice; MediaWiki; Muttator; Node.js ... For most of the software that I am using, I neither know the code bases nor the programming...
Read more >
[Solved]-React Native - Navigate after an async action - appsloveworld
This is one of the hardest problems in react native with the current Navigator API. I would suggest having a route store which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found