> I don't think that is it. As I read it, Tk catches the Destroy event
> alright, but the problem is that it is too late: the window
> destruction is already in motion at the time and there's no way to
> "undestroy" it from within binding. I think you need to create a "wm
> protocol" handler for WM_DELETE_WINDOW. As in
>
> x <- tktoplevel()
> tcl("wm", "protocol", x, "WM_DELETE_WINDOW", quote(cat("I'm staying!\n")))
>
> --- now try to destroy the window using window controls ---
>
> tcl("wm", "protocol", x, "WM_DELETE_WINDOW", "")
>
> --- things should be back to normal now ---
Yeah! That's it! Thanks!
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.