“window.frame.openDialog” not able select files in Mac OS X

送分小仙女□ 提交于 2019-12-12 09:18:33

问题


Using window.frame.openDialog, I am not able to select the files from the Open dialog box in Mac OS X. I could select the directory but not the files. Is there any way to select the files?

My code is:

window.frame.openDialog({
  type: 'open',
  title: 'Open...',
  multiSelect: false,
  acceptTypes: {
    'Images': ['*.hwc']
  },
  dirSelect: false,
  initialValue: '/'
});

回答1:


In MAC it is not possible to select files using window.frame.openDialog, instead of you can search and select file using fs.readFile.



来源:https://stackoverflow.com/questions/15288695/window-frame-opendialog-not-able-select-files-in-mac-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!