On 7/2/07, Chachereau Nicolas <[EMAIL PROTECTED]> wrote:
Here's a patch making the single instance handling use the
director interface. The patch assumes that the patch about exit
functions has already been applied.
Cool - that modernizes old code.
sprintf(requestPipeName,"/%s/SciTE.%d.in", g_get_tmp_dir(), getpid());
That's also cool - I've got into a bad habit of using hardcoded paths!
bool DirectorExtension::OnClose(const char *path) {
CheckEnvironment(host);
if (not_empty(path)) {
::SendDirector("closed", path);
}
return false;
which would make the Extension's new event OnClose available in
the director interface as well. It should be added to the Windows
version as well.
Completely. It occurred to me that OnBeforeSave() is another Extender
interface that could be useful to external clients, so one could take
action on a file before it gets overrwitten by SciTE. (Like make a
backup, take a diff, etc)
One last thing, I'm confused by the following:
// but do crash out if we failed and were started by an external director.
if (!fdReceiver && startedByDirector)
::exit(FALSE);
What does this call?
Ah, that must be legacy code! It is confusing because it's actually
exit(0) which would indicate a happy exit ;) The situation is
impossible at this point because the director will not be able to
communicate with its poor child...
steve d.
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest