Rename flush.react to flushReact

This commit is contained in:
Joe Cheng
2012-07-02 12:03:15 -07:00
parent 5c524af472
commit 8ce5a23c4b
2 changed files with 8 additions and 8 deletions

View File

@@ -323,16 +323,16 @@ Observer <- setRefClass(
get('.ReactiveEnvironment', envir=.GlobalEnv, inherits=F)
}
flush.react <- function() {
flushReact <- function() {
.getReactiveEnvironment()$flush()
}
.test <- function () {
values <- Values$new()
obs <- Observer$new(function() {print(values$get('foo'))})
flush.react()
flushReact()
values$set('foo', 'bar')
flush.react()
flushReact()
values$set('a', 100)
values$set('b', 250)
@@ -340,9 +340,9 @@ flush.react <- function() {
values$get('a') + values$get('b')
})
obs2 <- Observer$new(function() {print(paste0('a+b: ', observable$getValue()))})
flush.react()
flushReact()
values$set('b', 300)
flush.react()
flushReact()
values$mset(list(a = 10, b = 20))
flush.react()
flushReact()
}

View File

@@ -125,7 +125,7 @@ startApp <- function(app, www.root, sys.www.root=NULL, port=8101L) {
msg$method,
init = {
shinyapp$session$mset(msg$data)
flush.react()
flushReact()
local({
input <- .createValuesReader(shinyapp$session)
output <- .createOutputWriter(shinyapp)
@@ -142,7 +142,7 @@ startApp <- function(app, www.root, sys.www.root=NULL, port=8101L) {
update = {
shinyapp$session$mset(msg$data)
})
flush.react()
flushReact()
shinyapp$flushOutput()
}, ws_env)