[Sciviews-commits] r159 - in pkg: svMisc svMisc/R svTools/R svWidgets/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jul 30 09:56:52 CEST 2009


Author: romain
Date: 2009-07-30 09:56:50 +0200 (Thu, 30 Jul 2009)
New Revision: 159

Modified:
   pkg/svMisc/DESCRIPTION
   pkg/svMisc/NEWS
   pkg/svMisc/R/CompletePlus.R
   pkg/svTools/R/rdparse.R
   pkg/svWidgets/R/tkMenu.R
   pkg/svWidgets/R/tkTool.R
Log:
CompletePlus more careful with token starting with '.'

Modified: pkg/svMisc/DESCRIPTION
===================================================================
--- pkg/svMisc/DESCRIPTION	2009-07-29 14:08:17 UTC (rev 158)
+++ pkg/svMisc/DESCRIPTION	2009-07-30 07:56:50 UTC (rev 159)
@@ -3,7 +3,7 @@
 Imports: utils, methods
 Depends: R (>= 2.6.0)
 Description: Supporting functions for the GUI API (various utilitary functions)
-Version: 0.9-49
+Version: 0.9-50
 Date: 2009-07-29
 Author: Philippe Grosjean, Romain Francois & Kamil Barton
 Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>

Modified: pkg/svMisc/NEWS
===================================================================
--- pkg/svMisc/NEWS	2009-07-29 14:08:17 UTC (rev 158)
+++ pkg/svMisc/NEWS	2009-07-30 07:56:50 UTC (rev 159)
@@ -1,5 +1,11 @@
 = svMisc News
 
+== Changes in svMisc 0.9-50
+
+* CompletePlus removes the weird object names ( .__M__, ...) which were 
+  causing trouble
+
+
 == Changes in svMisc 0.9-48
 
 * Parse() does not detect incomplete R code any more, fixed (PhG)

Modified: pkg/svMisc/R/CompletePlus.R
===================================================================
--- pkg/svMisc/R/CompletePlus.R	2009-07-29 14:08:17 UTC (rev 158)
+++ pkg/svMisc/R/CompletePlus.R	2009-07-30 07:56:50 UTC (rev 159)
@@ -14,6 +14,11 @@
     comps <- utils:::.retrieveCompletions()
     if (!length(comps)) return(invisible(NULL))
 
+    # remove weird object names ( useful when the token starts with "." ) 
+    comps <- comps[ !grepl( "^[.]__[[:alpha:]]__", comps ) ]
+    if (!length(comps))
+		return(invisible(NULL))
+
     # restrict the completion for which information is gathered (speed things up)
     if (!"arguments" %in% types)
 		comps <- comps[regexpr("=$", comps) < 0]
@@ -53,7 +58,7 @@
     }
 
 		# deal with completions with "$"
-		if (length(test.dollar <- grep("\\$", comps))) {
+		if (length(test.dollar <- grep("\\$", comps)) ) {
 			elements <- comps[test.dollar]
 			object <- gsub("\\$.*$", "", comps)[1]
 			after <- gsub("^.*\\$", "", comps)

Modified: pkg/svTools/R/rdparse.R
===================================================================
--- pkg/svTools/R/rdparse.R	2009-07-29 14:08:17 UTC (rev 158)
+++ pkg/svTools/R/rdparse.R	2009-07-30 07:56:50 UTC (rev 159)
@@ -13,6 +13,6 @@
 	list( offset.start = offset.start, 
 	  offset.end = offset.end, 
 		chunks = chunks, names= names. )
+	
 }
 
-

Modified: pkg/svWidgets/R/tkMenu.R
===================================================================
--- pkg/svWidgets/R/tkMenu.R	2009-07-29 14:08:17 UTC (rev 158)
+++ pkg/svWidgets/R/tkMenu.R	2009-07-30 07:56:50 UTC (rev 159)
@@ -164,7 +164,9 @@
 
 tkMenuItemCall <- function( expr ){
 	if( TRUE ){
+		# remove { and } from the deparsed expression
 		text <- head(deparse( substitute( expr ) )[-1], -1)
+		cat( ">> ", text , "\n" )
 		.Internal( addhistory( text ) )
 	}
 	eval( expr, envir = parent.frame() )

Modified: pkg/svWidgets/R/tkTool.R
===================================================================
--- pkg/svWidgets/R/tkTool.R	2009-07-29 14:08:17 UTC (rev 158)
+++ pkg/svWidgets/R/tkTool.R	2009-07-30 07:56:50 UTC (rev 159)
@@ -131,6 +131,7 @@
 actionWrapper <- function( action ){
 	function(){
 		.Internal( addhistory( action ) )
+		cat (">> ", action, "\n" ) 
 		eval( parse( text = action ) )
 	}
 }



More information about the Sciviews-commits mailing list