[rkward-cvs] SF.net SVN: rkward:[3104] trunk/rkward/rkward/rbackend/rinterface.cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Mon Oct 4 20:10:41 UTC 2010
Revision: 3104
http://rkward.svn.sourceforge.net/rkward/?rev=3104&view=rev
Author: tfry
Date: 2010-10-04 20:10:40 +0000 (Mon, 04 Oct 2010)
Log Message:
-----------
Experimental fix for https://sourceforge.net/tracker/?func=detail&atid=459007&aid=3081071&group_id=50231
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rinterface.cpp
Modified: trunk/rkward/rkward/rbackend/rinterface.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rinterface.cpp 2010-10-04 12:24:31 UTC (rev 3103)
+++ trunk/rkward/rkward/rbackend/rinterface.cpp 2010-10-04 20:10:40 UTC (rev 3104)
@@ -533,9 +533,18 @@
} else if (type == RCallbackArgs::RReadLine) {
QString result;
- bool ok = RKReadLineDialog::readLine (0, i18n ("R backend requests information"), args->params["prompt"].toString (), runningCommand (), &result);
+ // yes, readline *can* be called outside of a current command (e.g. from tcl/tk)
+ bool dummy_command = false;
+ RCommand *command = runningCommand ();
+ if (!command) {
+ command = new RCommand ("");
+ dummy_command = true;
+ }
+
+ bool ok = RKReadLineDialog::readLine (0, i18n ("R backend requests information"), args->params["prompt"].toString (), command, &result);
args->params["result"] = QVariant (result);
+ if (dummy_command) delete command;
if (!ok) args->params["cancelled"] = QVariant (true);
} else if ((type == RCallbackArgs::RShowFiles) || (type == RCallbackArgs::REditFiles)) {
ShowEditTextFileAgent::showEditFiles (args);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list