From e94de15f832ce8b2632af81bd0d45aaba1086c9a Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Wed, 16 Oct 2013 15:42:36 -0500 Subject: [PATCH] well, we still have to use do.call(`$`) on .self; closes #274 Winston reported the issue at https://stat.ethz.ch/pipermail/r-devel/2013-October/067744.html partially reverted 86d61e0b443987d4898154ddd966c698058210d7 --- R/shiny.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/shiny.R b/R/shiny.R index 641320e2d..6570625e0 100644 --- a/R/shiny.R +++ b/R/shiny.R @@ -223,7 +223,9 @@ ShinySession <- setRefClass( }, dispatch = function(msg) { method <- paste('@', msg$method, sep='') - func <- try(.self[[method]], silent=TRUE) + # we must use $ instead of [[ here at the moment; see + # https://github.com/rstudio/shiny/issues/274 + func <- try(do.call(`$`, list(.self, method)), silent=TRUE) if (inherits(func, 'try-error')) { .sendErrorResponse(msg, paste('Unknown method', msg$method)) }