I did some playing around as this code has really not changed much at all in years.
I found that the only real change was made by Apple as its /usr/bin/open command has changed how it works. If an app is already open it will no longer pass the arguments (--args) passed to it, and it will no longer let you set new env vars (--env NAME=value) (again if the program is the already open).
So this prevents Sigil's XEditor from being able to run a new file on an already running instance of PageEdit. It even clobbers all fragments if we try to use /usr/bin/open with a file:/// url.
So no arguments get processed, no new env vars and no url fragments when the app is already running. This means Sigil with its XEditor can not open a new instance unless the older PageEdit instance is no longer running (i.e. you must use Quit to close PageEdit first).
The only workaround is to change PageEdit to automatically quit when the last window is closed, but this is very un-mac-like so I am loathe to do that.
So you will need to use Quit when closing out of PageEdit given the changes to how /usr/bin/open now works in later versions of macOS.
|