You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm making an application with pywebview+pyinstaller that opens files. On Mac I want the user to be able to drag files/folders onto the application icon to open them, which requires handling the OpenDocument Apple Event. I figured out how to do this with pywebview like this:
I'm happy to add this feature in to the source but not sure exactly the best way to make it generally usable. I had a specific event queue that I was monitoring and then opening new webview windows when a new file was dropped. Not sure if that model makes sense for more general? Or adding an optional callback function? Thoughts?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm making an application with pywebview+pyinstaller that opens files. On Mac I want the user to be able to drag files/folders onto the application icon to open them, which requires handling the OpenDocument Apple Event. I figured out how to do this with pywebview like this:
I'm happy to add this feature in to the source but not sure exactly the best way to make it generally usable. I had a specific event queue that I was monitoring and then opening new webview windows when a new file was dropped. Not sure if that model makes sense for more general? Or adding an optional callback function? Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions