ryanwischkaemper / aurelia-nw

NW.js (nodewebkit) app with Aurelia
The Unlicense
3 stars 1 forks source link

new gui.Menu() Not working .....need help #7

Open rameshbansal opened 8 years ago

rameshbansal commented 8 years ago

I am using you repo--> nw.js with aurelia .. I am able to require("nw.gui") as you did in window bar.js . But I am not able to create new gui.Menu() . Some code for reference var gui = require('nw.gui'); export class App { add_collection () { console.log("add collection called"); } attached() { console.log("attached called",gui); var menu = new gui.Menu(); menu.append(new gui.MenuItem({ label: 'Add Collection', click: this.add_collection })); $("body").bind('contextmenu', function(ev) { ev.preventDefault(); menu.popup(ev.pageX, ev.pageY); return false; }); } } Any one can help me on this????? Thanx in advance

ryanwischkaemper commented 8 years ago

@singh-manpreet1 Can you provide specific details about the error you are receiving? What file are you trying to do this in? What exactly does the error say?