4 ms·
>Flutter and Electron can't even manage multiple windows How so? I use multi window Electron apps, VS Code is one of them
by wooque 4y ago
>Flutter and Electron can't even manage multiple windows
How so? I use multi window Electron apps, VS Code is one of them
- makeitdouble 4y agoDo your VS Code windows interact with each other? I think parent is thinking about a behavior like the tool panels in Photoshop.
- sleazebreeze 4y agoI work on an Electron app that has multiple windows interacting with each other in all kinds of ways. It's quite possible.
- bmitc 4y agoIt's possible in the sense of how webapps do it, because that's basically how Electron does it. Electron creates several different processes that talk to each other through an inter-process communication model. Electron's process model is rather complex. https://www.electronjs.org/docs/latest/tutorial/process-model https://www.electronjs.org/docs/latest/tutorial/process-mode... This is not how native desktop applications handle multiple windows, although they could obviously.
- jaredklewis 4y agoYea, it can be done: https://www.electronjs.org/docs/latest/tutorial/ipc https://www.electronjs.org/docs/latest/tutorial/ipc
- bmitc 4y agoThat's a low barrier for what is meant by managing multiple windows. What I mean by "managing multiple windows" is a single OS-process and application managing multiple windows: creating them, destroying them, hiding them, etc. Electron cannot do this. You are basically creating separate applications that talk to each other through inter-process communication. I mean, it says it right there in the link you posted. The process model of Electron is complex. Here's how you create multiple windows in my in-work prototype: let windowing = Windowing() windowing.Initialize() windowing.CreateWindow("Window 1") windowing.CreateWindow("Window 2") windowing.CreateWindow("Window 3") while(windowing.WindowsAreOpen) do System.Threading.Thread.Sleep(100)
- makeitdouble 4y agoWould it be one full electron process for each window ? That would be quite a load if the user decides each current pane is now an independent window on the screen. I remember JVM apps hitting this same issue. There are many ways to make two entities talk together (if IPC wasn't an option, a local IP channel would work as well, albeit way more costly), but then the performance would be abysmal, for apps that were already handicapped. Same process windows are way lighter than that.
- bmitc 4y agoIt's possible to do, but it's not what I meant. I have four windows open in Visual Studio Code right now, and Visual Studio Code has 81 separate OS processes running. There is not one application, one OS process, nor even one programming language running all of that.