GithubHelp home page GithubHelp logo

Comments (5)

Sadaf-A avatar Sadaf-A commented on June 10, 2024

@jerrygreen Hey, I just tested this on windows 11 and it is working as expected I hope you are talking about the os.showOpenDialog() method. Which windows version are you using?

from neutralinojs.

jerrygreen avatar jerrygreen commented on June 10, 2024

Urgh, it’s not exactly my use-case you’re describing. Here, I’m not using os.showOpenDialog()

If I understand correctly from what I read from the docs, os.showOpenDialog() is meant to use to open files internally – from within the app.

What I describing here, is when user opens the file from the system, then the system calls the program, i.e. program initiated externally.

Say, I have .md files, and I want assign this extension to my little program, which is markdown viewer. So when I double-click a markdown file from finder/nautilus/explorer – my program is automatically started by system, and the program opens corresponding file immediately. That’s just an example.

In my use-case, I wanted to make a program to preview 3D model, which I did and it’s working, but I don’t know how to assign .gltf extension to my program as a default program opening this kind of files – when I do assign the extension to my program, this error occurs while opening the file.

Basically, it’s a bit different use-case than os.showOpenDialog()

It seems it’s not possible to do with Neutralino currently, but I might be mistaken. I haven't found an example in docs. It seems like I need some kind of event listener for this.

My specs:

OS: Windows 10 x64 (22H2)
Neutralinojs version: v5.0.0
Neutralinojs client library version: v5.0.0
Neutralinojs CLI version: v11.0.0

from neutralinojs.

jerrygreen avatar jerrygreen commented on June 10, 2024

On another glance into the docs, I think I might have found the thing, actually. It might be this:

Not gonna check it for the time rn, to know whether it works from external call or not, since I'm onto other projects already.

Might be useful for others if they come by from google, though. Seems like it's exactly the thing I needed.

from neutralinojs.

Ayush-sss avatar Ayush-sss commented on June 10, 2024

I want to work on this issue. @jerrygreen Please assign me this issue. I will try my best to fix this bug.

from neutralinojs.

OrigamingWasTaken avatar OrigamingWasTaken commented on June 10, 2024

Urgh, it’s not exactly my use-case you’re describing. Here, I’m not using os.showOpenDialog()

If I understand correctly from what I read from the docs, os.showOpenDialog() is meant to use to open files internally – from within the app.

What I describing here, is when user opens the file from the system, then the system calls the program, i.e. program initiated externally.

Say, I have .md files, and I want assign this extension to my little program, which is markdown viewer. So when I double-click a markdown file from finder/nautilus/explorer – my program is automatically started by system, and the program opens corresponding file immediately. That’s just an example.

In my use-case, I wanted to make a program to preview 3D model, which I did and it’s working, but I don’t know how to assign .gltf extension to my program as a default program opening this kind of files – when I do assign the extension to my program, this error occurs while opening the file.

Basically, it’s a bit different use-case than os.showOpenDialog()

It seems it’s not possible to do with Neutralino currently, but I might be mistaken. I haven't found an example in docs. It seems like I need some kind of event listener for this.

My specs:

OS: Windows 10 x64 (22H2)
Neutralinojs version: v5.0.0
Neutralinojs client library version: v5.0.0
Neutralinojs CLI version: v11.0.0

I had actually the same problem (on macos) and my temporary fix was to create within the app, some sort of URL-Scheme handler that would get launched and receive the file, then forward them to the main neutralino app. This handler can be made in powershell, etc...

from neutralinojs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.