Skip to content

HowTo get callback on destroy of grDevices::windows()

2 messages · rrichte2 at fh-lausitz.de, Paul Murrell

#
I'm build with the usage of the tcltk/tcltk2 package a gui which is

started with rscript.exe. At this gui the user is able to open and close
plot windows.

Now I'm looking for a way that a r function is called when a
grDevices::windows window is closed.
Is there a way to attach a callback function or so, which would be
triggert if the user click at close of the grDevices::window?

My workarround is to check continues the open windows with the tcl
command after, but it's no good workarround.

thanks
roland
3 days later
#
Hi
On 27/07/2010 7:49 a.m., rrichte2 at fh-lausitz.de wrote:
I don't think this is possible with standard R graphics devices.  Have 
you taken a look at the 'tkrplot' package; if you produce a tcltk window 
with an R graphics device embedded, instead of opening/closing raw R 
graphics devices, perhaps you could gain more control over the 
opening/closing of the window (?)

Paul