Re: STk cleanup hook?

From: Erick Gallesio <eg_at_kaolin.unice.fr>
Date: Mon, 24 Jul 1995 14:38:45 +0100

> jin_at_atype.com writes
> Is there a way I can get some code to be run when STk exits, both
> normally and by getting killed?
>
If you want to execute some C code, it can be done in the function
STk_user_cleanup.
If you want to execute scheme-code, there is no way to do so. A quick hack
consists to add the line
        STk_eval_C_string("(if symbol-bound? 'stk-quit) (stk-quit))
in this function and it will be called when the interpreter exits.
If you want to execute also this code when the *root* window is killed you can
do
        (bind *root* "<Destroy>" '(stk-quit))

I realize this is ugly, and I will change it for next release.



                -- Erick
Received on Mon Jul 24 1995 - 14:41:30 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST