single-instance is deprecated and it’s always true. You CANNOT have multiple instances for your app."On Feb 5, 2016, at 10:04 AM, Fergus <firg...@gmail.com> wrote:The "Migrate from 0.12 to 0.13" page in the docs says: "single-instanceis deprecated and it’s alwaystrue. You CANNOT have multiple instances for your app."
This is truly a killer blow.
It means that an editor, for instance, cannot have two instances open. I don't know about anyone but I have four or more open when working on a project. Or a game app that allows communication between two players via sockets cannot be tested with two instances on the same machine. Likewise various handy dev tools or user widgets - database viewers. image and pdf readers, file explorers/tools, handy calculators or web-watching widgets... these are all cases where the user being limited to just one instance means going elsewhere for their application, even if the nw.js one is otherwise the bees knees.
Is the cause of this restriction insurmountable? Could creative minds puzzle a way around it?
--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Feb 5, 2016, at 2:21 PM, firg...@gmail.com wrote:Yes, it's certainly possible to design and implement a top level manager that controls multiple windows under the same instance of the app but should it have to be necessary? Every programmer who wishes to provide multiple instances is now required by NW.js v0.13 to reinvent a wheel that NW.js v0.12 already provides out of the box - and I'm sure that not all programmers will make a good job of it.
Some won't bother if it's too hard and others may not even realise that some people might want multiple instances. If a user obtains a utility, game or whatever from someone who didn't, or couldn't, create a workiing top level window manager then what choice do they have? Find something similar write to use Electron or Tint?
Another issue is how a subsequent instance would get opened. From what you've said, I gather that the user asks your application for a new window and off they go. How would it work if that window isn't readily available? Consider a NW.js calculator app that's not quite as trivial as Window's own. The user might have opened it, used it and moved on. It might be buried under a pile of other windows or even away, out of sight, on a different virtual desktop. The user may have forgotten that they've even got it open. They click a shortcut for the calculator, or press a hotkey combination, and nothing happens. Confusion and frustration ensues... and then possibly a hunt by the user to find the missing open app. It's all very unnecessary.
Heh heh. You shouldn't be glad that I can't run my two game instances on a single machine. I'm still testing the game logic and message protocol so the transport efficiency is a problem for a later todo list. :-) Actually it doesn't even need to be two players communicating. I've had six instances of the game open just for myself, to analyse the options for my next move. Now I could do what you've done and write a window manager for that but if I adopted NW.js then I'd only be putting back a facility that I already have.
I don't use actually NW.js, I use MS HTA, the original Html+Css+Js application container. It's giving me good service for over a decade but it's time to look for a successor. I'm literally only just evaluating NW.js against the other options and v0.13 loses big points for this limitation.
--
There are some pretty weighty implications IMO:
* nw.js cannot be packaged for Debian
* developers cannot quickly test network-based apps on a single machine
* developers can't even quickly compare two instances of the same app with different state (for testing and bug-hunting purposes)
If user-data dir is the only sticking point, then why not just make --user-data-dir a required
flag when --single-instance is false? Or use a unique tmp dir if --user-data-dir isn't
specified, etc.
Hi,What do you mean by it? Specific to Debian or Debian based? I have no problem packaging it for Ubuntu.There are some pretty weighty implications IMO:
* nw.js cannot be packaged for DebianActively testing on it.
setTimeout(function() {
var gui = require('nw.gui');
// Create a new window and get it var new_win = gui.Window.open('/NXSBIN/main2.html', { "icon": "./NXSBIN/img/icon.png", "title": "Nexus Slasher", "frame": true,
"resizable": false, "position": "center",
"width": 1280, "height": 740, "show": true, "fullscreen": false
});
}, 2000);