[rkward-cvs] SF.net SVN: rkward:[2828] trunk/rkward/rkward/rbackend/rpackages/rkward/R/ internal.R
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Apr 21 10:57:20 UTC 2010
Revision: 2828
http://rkward.svn.sourceforge.net/rkward/?rev=2828&view=rev
Author: tfry
Date: 2010-04-21 10:57:20 +0000 (Wed, 21 Apr 2010)
Log Message:
-----------
Last minute fix for some problems in menu and select.list.
For select.list, the first parameter was renamed in R 2.11.0.
For both, they could sometimes be picked up in namespace:utils, unmodified. We try to counter this, by placing yet another version in the search path (rkward::menu/select.list).
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R 2010-04-21 09:03:19 UTC (rev 2827)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R 2010-04-21 10:57:20 UTC (rev 2828)
@@ -446,7 +446,9 @@
invisible (TRUE)
}
-".rk.select.list.proxy" <- function () {
+"select.list" <- function () {
+ # the "list" parameter was renamed to "choices" in R 2.11.0
+ if (!exists ("list", inherits=FALSE)) list <- choices
# the "graphics" parameter was introduced in R 2.11.0, so we cannot rely on its existance
if (!exists ("graphics", inherits=FALSE)) graphics <- TRUE
if (graphics) {
@@ -456,10 +458,10 @@
# for text list, use the default implementation
eval (body (.rk.select.list.default))
}
-formals (.rk.select.list.proxy) <- formals (utils::select.list)
+formals (select.list) <- formals (utils::select.list)
.rk.select.list.default <- utils::select.list
-".rk.menu.proxy" <- function () {
+"menu" <- function () {
if (graphics) {
res <- rk.select.list (choices, multiple=FALSE, title=title)
return (match(res, choices, nomatch = 0L))
@@ -468,12 +470,12 @@
# for text menus, use the default implementation
eval (body (.rk.menu.default))
}
-formals (.rk.menu.proxy) <- formals (utils::menu)
+formals (menu) <- formals (utils::menu)
.rk.menu.default <- utils::menu
# where masking is not enough, we need to assign in the namespace. This can only be done after package loading,
# so we have a separate function for that.
".rk.fix.assignments" <- function () {
- assignInNamespace ("menu", .rk.menu.proxy, envir=as.environment ("package:utils"))
- assignInNamespace ("select.list", .rk.select.list.proxy, envir=as.environment ("package:utils"))
+ assignInNamespace ("menu", menu, envir=as.environment ("package:utils"))
+ assignInNamespace ("select.list", select.list, envir=as.environment ("package:utils"))
}
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