[Rd] Plot window does not update in embedded code
Simon Urbanek
simon.urbanek at r-project.org
Wed Jul 21 22:28:02 CEST 2010
Use
R_CheckUserInterrupt()
The code below is very fragile and unix-specific.
Cheers,
Simon
On Jul 21, 2010, at 3:45 PM, Thomas Friedrichsmeier wrote:
> Hi,
>
> On Wednesday 21 July 2010, Jan van der Laan wrote:
>> How do I ensure that the windows keep being updated?
>
> in RKWard we run the following periodically during idle phases:
>
>
> // this basically copied from R's unix/sys-std.c (Rstd_ReadConsole)
> #ifndef Q_WS_WIN
> for (;;) {
> fd_set *what;
> what = R_checkActivityEx(R_wait_usec > 0 ? R_wait_usec : 50, 1,
> Rf_onintr);
> R_runHandlers(R_InputHandlers, what);
> if (what == NULL) break;
> }
> /* This seems to be needed to make Rcmdr react to events. Has this always
> been the case? It was commented out for a long time, without anybody noticing.
> */
> R_PolledEvents ();
> #else
> R_ProcessEvents();
> #endif
>
>
> Regards
> Thomas
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
More information about the R-devel
mailing list