Open Korijn opened 6 years ago
At this point, the flexx.webruntime
module does not support electron yet (only nw.js and Xul/Firefox as app runtimes).
https://github.com/nwjs/nw.js/wiki/file-dialogs
nw.js supports it!
I haven't looked at the nwjs runtime in about a year, but everything still works, including the installation/update process: simply download the archive, and Flexx will pick it up ...
... Running a Flexx app ...
[I 14:26:00 flexx.webruntime] launched as nw app: http://localhost:49190/ImageTest/?session_id=eeB2EnmVWD4VFKIWpo9AISCo
>>> m.session.runtime
<flexx.webruntime._nw.NWRuntime object at 0x000001E8CDAC30B8>
>>> m.session.runtime.get_install_instuctions()
'Download the NW.js archive for your platform from "http://nwjs.io". Flexx will find the file if it is placed in your home dir, desktop, downloads dir (where most browser save it) or the default temp dir.'
>>> m.session.runtime.get_version()
'0.20.2'
... goto nwjs.io and hit the download button ...
... rerun app ...
[I 14:27:26 flexx.webruntime] Performing update of runtime nw
[I 14:27:29 flexx.webruntime] Extracted archive into nw_0.28.2 in 2.7 s
[I 14:27:29 flexx.webruntime] launched as nw app: http://localhost:49190/ImageTest/?session_id=b8zd65z3azl3xMeYL4n5pS94
>>> m.session.runtime.get_version()
'0.28.2'
FileBrowserWidget
that could be used as a basis for a file selection dialog.Almar, It seems necessary to include the ability to browse and ‘upload’ a file and path to the core app. Do you have an example of the FileBrowserWidget usage ?
No, but an example in the flexxamples
directory would be a welcome addition :)
Electron apparently inserts an additional property
path
intoFile
objects: https://github.com/electron/electron/blob/v1.2.8/docs/api/file-object.mdDoes flexx support running inside Electron?