[Stacomir-commits] r216 - pkg/stacomir/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Sep 24 09:39:58 CEST 2016


Author: briand
Date: 2016-09-24 09:39:58 +0200 (Sat, 24 Sep 2016)
New Revision: 216

Modified:
   pkg/stacomir/R/BilanMigration.r
   pkg/stacomir/R/interface_BilanMigration.r
   pkg/stacomir/R/interface_BilanMigrationMult.r
   pkg/stacomir/R/utilitaires.r
Log:
debug bilan migration

Modified: pkg/stacomir/R/BilanMigration.r
===================================================================
--- pkg/stacomir/R/BilanMigration.r	2016-09-23 19:33:09 UTC (rev 215)
+++ pkg/stacomir/R/BilanMigration.r	2016-09-24 07:39:58 UTC (rev 216)
@@ -164,7 +164,6 @@
 			bilanMigration=connect(bilanMigration)
 			if (!silent) cat(stringr::str_c("data collected from the database nrow=",nrow(bilanMigration at data),"\n"))
 			stopifnot(validObject(bilanMigration, test=TRUE))
-			if (!silent) funout(get("msg",envir=envir_stacomi)$BilanMigration.2)
 			return(bilanMigration)
 		})
 
@@ -189,7 +188,7 @@
 			}
 			bilanMigration<-object
 
-				if (nrow(bilanMigration at data>0)){
+				if (nrow(bilanMigration at data)>0){
 #				bilanMigration at data$time.sequence=difftime(bilanMigration at data$ope_date_fin,
 #						bilanMigration at data$ope_date_debut,
 #						units="days")
@@ -455,11 +454,8 @@
 	} else {      
 		funout(get("msg",envir_stacomi)$BilanMigration.5,arret=TRUE)
 	}
-	
 	plot(bilanMigration,plot.type="standard")
-	# ecriture du bilan journalier, ecrit aussi le bilan mensuel
-	fn_EcritBilanJournalier(bilanMigration)
-	
+		
 }
 
 #' handler for calcul hBilanMigrationgraph2
@@ -526,5 +522,5 @@
 		funout(get("msg",envir_stacomi)$BilanMigration.5,arret=TRUE)
 	}
 	# ecriture du bilan journalier, ecrit aussi le bilan mensuel
-	fn_EcritBilanJournalier(bilanMigration)
+	fn_EcritBilanJournalier(bilanMigration,silent=FALSE)
 }
\ No newline at end of file

Modified: pkg/stacomir/R/interface_BilanMigration.r
===================================================================
--- pkg/stacomir/R/interface_BilanMigration.r	2016-09-23 19:33:09 UTC (rev 215)
+++ pkg/stacomir/R/interface_BilanMigration.r	2016-09-24 07:39:58 UTC (rev 216)
@@ -1,6 +1,9 @@
 #' Interface for BilanMigration class
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
 interface_BilanMigration=function(){
+ 
+	quitte()
+	
 	bilanMigration=new("BilanMigration")
 	assign("bilanMigration",bilanMigration,envir = envir_stacomi)
 	fonctionnementDC=new("BilanFonctionnementDC")
@@ -9,8 +12,7 @@
 	funout(get("msg",envir=envir_stacomi)$interface_BilanMigration.1)
 	bilanMigration at taxons=charge(bilanMigration at taxons)
 	bilanMigration at stades=charge(bilanMigration at stades)
-	bilanMigration at dc=charge(bilanMigration at dc)   
-	quitte()
+	bilanMigration at dc=charge(bilanMigration at dc)  
 	group <- gWidgets::ggroup(horizontal=FALSE)   # doit toujours s'appeller group
 	assign("group",group,envir = .GlobalEnv)  
 	add(ggroupboutons,group)

Modified: pkg/stacomir/R/interface_BilanMigrationMult.r
===================================================================
--- pkg/stacomir/R/interface_BilanMigrationMult.r	2016-09-23 19:33:09 UTC (rev 215)
+++ pkg/stacomir/R/interface_BilanMigrationMult.r	2016-09-24 07:39:58 UTC (rev 216)
@@ -4,7 +4,8 @@
 #' This function is called from a handler in the main graphical interface
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
 interface_BilanMigrationMult=function(){
-	quitte()
+	quitte() # quitte must be the first in interface methods 
+	#(destroys everything in envir_stacomi except stuff required at to level)
 	objectBilan="bilanMigrationMult"
 	assign("objectBilan",objectBilan,envir=envir_stacomi)
 	bilanMigrationMult=new("BilanMigrationMult")

Modified: pkg/stacomir/R/utilitaires.r
===================================================================
--- pkg/stacomir/R/utilitaires.r	2016-09-23 19:33:09 UTC (rev 215)
+++ pkg/stacomir/R/utilitaires.r	2016-09-24 07:39:58 UTC (rev 216)
@@ -15,7 +15,7 @@
 	if (exists("envir_stacomi")){
 		miettes=ls(envir=envir_stacomi)
 		if (length(miettes)> 0 ) {
-			miettes=miettes[!miettes%in%c("msg","datawd","sch","lang","baseODBC","usrname","usrpwd")]
+			miettes=miettes[!miettes%in%c("msg","datawd","sch","lang","baseODBC","usrname","usrpwd","database_expected","gr_interface","login_window")]
 			rm(list=miettes,envir=envir_stacomi)
 		}      
 	}



More information about the Stacomir-commits mailing list