Lisp Knowledgebase

Title: How to programmatically close windows created by calling capi:display

ID: 10015


Product: LispWorks for Windows
Version: All
OS: All Windows platforms

Description:
This is a multithreading problem. By default, capi:display creates a new light-weight process for the interface using mp:process-run-function and, in MS Windows, calls to capi:destroy or capi:quit-interface must be in the same process as the window itself.

You need to execute the capi:destroy in the interface's process. Usually this happens automatically, for example via a callback from the interface itself. In cases where you want to destroy an interface from another window, use capi:execute-with-interface to call the function in the process associated with the interface.


eg

(setq interface (capi:display (make-instance 'capi:interface)))
(capi:execute-with-interface interface 'capi:destroy interface)
or
(capi:execute-with-interface interface
                            #'(lambda () (capi:destroy interface)))

See Also:
Workaround:
Patch:

Hardware:N/A
Summary:
Bug#:
Patch Enhancement#:
Reported:comp.lang.lisp

Company     Contact     Privacy Policy     Terms of Use