Dear R developers, in RKWard we use a custom main loop built around R_ReplDLLdo1(). Recently I found out that toplevel task callback are not called. Looking at the source of R_ReplDLLdo1() in main.c, the reason is easy to see: This simply does not include a call to Rf_callToplevelHandlers().
There may well be reasons for that. On the other hand, I could not find explicit documentation to this effect, and according to svn annotate, R_ReplDLLdo1() predates task callbacks. So perhaps this is an oversight after all. Using the google code search, the only other use case I could find (besides R test cases, and RKWard) is the Mac-GUI. I would assume that calling the task callback handlers would be the desired behavior, there, too. I did not find any way to integrate the task callback handlers from the embedding application, when using R_ReplDLLdo1(). Is there any? Would it be possible to add a call to Rf_callToplevelHandlers in R_ReplDLLdo1() (*)? Alternatively, would it be possible to add an equivalent of R_ReplConsole(R_GlobalEnv, R_PPStackTop, 0); to the API (importantly without calls to setup_Rmainloop() and end_Rmainloop())? Thanks, Thomas -- (*): In fact, I wonder, why R_ReplDLLdo1() is not simply based on Rf_ReplIteration().
signature.asc
Description: This is a digitally signed message part.
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel