MacGapProject / MacGap1

Desktop WebKit wrapper for HTML/CSS/JS applications.
Other
3.55k stars 208 forks source link

Feature Request (maybe macgap2): File Dialogs like in node-webkit #123

Closed gobijan closed 10 years ago

gobijan commented 10 years ago

Hi, the only reason I chose node-webkit for an app that needed to save files was its built in file dialogs. They kind of extended the classic file upload dialog.

This feature is described here: https://github.com/rogerwang/node-webkit/wiki/File-dialogs

What do you think about it for macgap? Cheers Bijan

rawcreative commented 10 years ago

The reason this is possible with NW is because they are shipping a custom version of Chromium/Webkit that has been modified to produce this behavior. To be able to include this in MacGap, a custom version of Webkit would need to be shipped which is far from ideal. About the only thing we could do is provide a JS api to open/trigger various file dialogs. Which means you'd have to return false or event.preventDefault() for the click event of your file dialog and then open the dialog manually with the js api.

gobijan commented 10 years ago

I would also prefer a JS triggerable file dialog. This feature would be great. Currently including nodelike means one has to build an own file picker ui. This is far from optimal. So something that could trigger a file dialog from JS would do the job. I was just referencing node-webkit in order to get a better understanding of what I'm talking about. They plan to create a JS-API for triggering file dialogs. This also should be the macgap way.

jeff-h commented 10 years ago

@tschundeee your wish is my @rawcreative 's command... lol Hold your breath for MacGap 2 :)

rawcreative commented 10 years ago

Ha.. this can be closed, I've already implemented it into the MG 2 rewrite.