From thomas.friedrichsmeier at ruhr-uni-bochum.de  Wed Jul 21 21:45:39 2010
From: thomas.friedrichsmeier at ruhr-uni-bochum.de (Thomas Friedrichsmeier)
Date: 21 Jul 2010 21:45:39 +0200
Subject: [Rd] Plot window does not update in embedded code
In-Reply-To: <AANLkTilIxmc9rrIs2NXLna_wXzQPLFH4tDHK-FOgk3gZ@mail.gmail.com>
References: <AANLkTilIxmc9rrIs2NXLna_wXzQPLFH4tDHK-FOgk3gZ@mail.gmail.com>
Message-ID: <201007212145.44130.thomas.friedrichsmeier@ruhr-uni-bochum.de>

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20100721/c1088344/attachment.bin>


[Rd] Plot window does not update in embedded code
Thomas Friedrichsmeier