Re: [Rd] HowTo get callback on destroy of grDevices::windows()

From: Paul Murrell <p.murrell_at_auckland.ac.nz>
Date: Fri, 30 Jul 2010 15:45:47 +1200

Hi

On 27/07/2010 7:49 a.m., rrichte2_at_fh-lausitz.de wrote:
> 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.

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

> thanks
> roland
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul_at_stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 30 Jul 2010 - 03:52:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 30 Jul 2010 - 10:20:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive