Executes a function in the event process of a given interface if it is alive.
capi
execute-with-interface-if-alive interface function &rest args => alivep
interface⇩ |
An interface. |
function⇩ |
A function designator. |
args⇩ |
Arguments passed to function. |
alivep⇩ |
A boolean. |
The function execute-with-interface-if-alive
applies the function function to the arguments args in the process of the interface interface, if the interface is "alive". An interface become alive during the creation process before interface-display is called (and before display returns). It stops being alive once it is destroyed, either programmatically or by the user.
If interface is not alive, function is not applied. This is in contrast to execute-with-interface, which in this case applies the function in the current process.
The return value alivep is true if interface was alive while execute-with-interface-if-alive
executed. It does not guarantee that function is going to be called.
execute-with-interface-if-alive
is useful for automatic updating of interfaces that may be destroyed by the user, where the update is redundant if the interface is not alive.
execute-with-interface-if-alive
on the dead interface. It should be checked only when the caller knows that the interface is already displayed (display returned, or interface-display was called on it), otherwise it may be nil
because it is not displayed yet.execute-with-interface-if-alive
is one way of ensuring this.
apply-in-pane-process-if-alive
execute-with-interface
4.1 The correct thread for CAPI operations
7 Programming with CAPI Windows
CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27