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 86d61e0b44
This commit is contained in:
Yihui Xie
2013-10-16 15:42:36 -05:00
parent 6af7de51a5
commit e94de15f83

View File

@@ -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))
}