aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-10-29 01:39:20 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2015-10-29 07:31:02 +0100
commit9ddd8dd2d03531ded7022a6e1ce2dbb5a29cd77e (patch)
tree196bf024cda0e9a9add818cd7e320f98d6bce302 /R
parent197a7c87a5bffe7e34699c0455a6da9207770500 (diff)
First functional version of the model gallery
Diffstat (limited to 'R')
-rw-r--r--R/gmkin.R18
1 files changed, 16 insertions, 2 deletions
diff --git a/R/gmkin.R b/R/gmkin.R
index 31e8cf4..424054e 100644
--- a/R/gmkin.R
+++ b/R/gmkin.R
@@ -1,3 +1,17 @@
-gmkin <- function() {
- load_app(system.file("GUI/gmkin.R", package = "gmkin"))
+# This makes use of the ::: operator
+# To avoid this, gWidgetsWWW2 needs to be adapted
+gmkin <- function(script_name, show.log = FALSE) {
+ if (missing(script_name)) {
+ script_name = system.file("GUI/gmkin.R", package = "gmkin")
+ }
+ session_manager = gWidgetsWWW2:::make_session_manager()
+ r_httpd <- gWidgetsWWW2:::R_http$get_instance()
+ r_httpd$start()
+ r_httpd$load_gw(session_manager)
+ r_httpd$load_app(script_name, "gmkin", session_manager,
+ open_page = TRUE, show.log = show.log)
+ gmkin_png <- Rook::Static$new(
+ urls = c("/"),
+ root = system.file("GUI/png", package="gmkin"))
+ r_httpd$R$add(Rook::RhttpdApp$new(gmkin_png, name="gmkin_png"))
}

Contact - Imprint