From: Thomas Grill gr@grrrr.org To: Hans-Christoph Steiner hans@eds.org CC: pd-list@iem.at Subject: Re: [PD] open recent Date: Tue, 04 Dec 2007 22:25:26 +0100
Also if we double-click on the icon of a patch still on win32 platform, it opens an instance of pd, it would be nice if the patch was opened in the already loaded (the last one at least) instance of pd.
That is an old, known bug. I saw this Miller's TODO. If you got this working, and submitted a patch, I think he would be likely to accept it.
I'm also very curious about a solution for this, which is non-trivial on Windows. I failed to do it with DDE (because old-fashioned DDE doesn't seem to be really working with current Windows versions) and using the "find running PD process" method requires sending an "open patcher" inquiry to the TCL/TK part of the already-running PD which is beyond my TCL/TK capabilities (not to mention interest).
There's EnumProcesses in the PSAPI. ( http://msdn2.microsoft.com/en-us/library/ms682629.aspx ) A newly started instance of pd could use it to determine that it wasn't the only pd running and quit. How would it pass the patch to the other pd? There must be a registry setting for this kind of thing, since, for example, Photoshop doesn't open a new instance whenever you double-click one of its documents.
Martin