[Openmcl-devel] suppressing "... save the changes ...?"

Arthur Cater arthur.cater at ucd.ie
Thu Feb 23 23:45:53 UTC 2012


I've a problem with some code I've recently contributed. It creates Hemlock windows
and streams for writing to them (and provides a format directive /clickable/ which is
not the issue here).

The windows have an annoying feature, which is that when I close one manually
I get asked "Do you want to save the changes ...". For some windows at least,
I'd like to regard them as scratch windows that should just go away when they are
told to. I tried (in a private version, not in the version you might find in contribs)
a number of things in a specialised #/windowShouldClose method,
but have learned that the question is asked before that method is invoked.

I now (in private) arrange - and this still does not work! - that whenever I write to the stream
I do so inside GUI::EXECUTE-IN-GUI and also there do
    (#/updateChangeCount:  <theDocument>  #$NSChangeCleared)
    (hi::%set-buffer-modified   <theBuffer>  nil)
    (#/setDocumentEdited:   <theWindow>   #$NO)


Can anyone please suggest a workable way to get a Hemlock window to just die quietly?

Arthur




More information about the Openmcl-devel mailing list