[Stacomir-commits] r380 - in pkg/stacomir: . R inst/config
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 5 22:09:53 CEST 2017
Author: briand
Date: 2017-06-05 22:09:53 +0200 (Mon, 05 Jun 2017)
New Revision: 380
Modified:
pkg/stacomir/DESCRIPTION
pkg/stacomir/R/BilanEspeces.r
pkg/stacomir/R/BilanMigration.r
pkg/stacomir/R/PasDeTempsJournalier.r
pkg/stacomir/R/PasdeTemps.r
pkg/stacomir/R/RefAnnee.r
pkg/stacomir/R/RefCheckBox.r
pkg/stacomir/R/RefChoix.r
pkg/stacomir/R/RefDC.r
pkg/stacomir/R/RefDF.r
pkg/stacomir/R/RefHorodate.r
pkg/stacomir/R/RefListe.r
pkg/stacomir/R/RefStades.r
pkg/stacomir/R/RefStationMesure.r
pkg/stacomir/R/RefTaxon.r
pkg/stacomir/R/Refpar.r
pkg/stacomir/R/Refparqual.r
pkg/stacomir/R/ReftextBox.r
pkg/stacomir/R/funSousListeBilanMigrationPar.r
pkg/stacomir/R/interface_BilanAgedemer.r
pkg/stacomir/R/interface_BilanAnnuels.r
pkg/stacomir/R/interface_BilanArgentee.r
pkg/stacomir/R/interface_BilanConditionEnv.r
pkg/stacomir/R/interface_BilanFonctionnementDC.r
pkg/stacomir/R/interface_BilanFonctionnementDF.r
pkg/stacomir/R/interface_BilanMigration.r
pkg/stacomir/R/interface_BilanMigrationCar.r
pkg/stacomir/R/interface_BilanMigrationInterannuelle.r
pkg/stacomir/R/interface_BilanMigrationMult.r
pkg/stacomir/R/interface_BilanMigrationMultConditionEnv.r
pkg/stacomir/R/interface_Bilan_carlot.r
pkg/stacomir/R/interface_bilan_poids_moyen.r
pkg/stacomir/R/stacomi.r
pkg/stacomir/R/utilitaires.r
pkg/stacomir/inst/config/stacomi_manual_launch.r
Log:
Removing all assignments to .GlobalEnv, this is a major change in the way the interface is working. Testing still to do.
Modified: pkg/stacomir/DESCRIPTION
===================================================================
--- pkg/stacomir/DESCRIPTION 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/DESCRIPTION 2017-06-05 20:09:53 UTC (rev 380)
@@ -1,6 +1,6 @@
Package: stacomiR
-Version: 0.5.1
-Date: 2017-05-16
+Version: 0.5.2
+Date: 2017-06-05
Title: Fish Migration Monitoring (stacomiR)
Authors at R: c(person("Cedric", "Briand", role = c("aut", "cre"), email = "cedric.briand00 at gmail.com"),
person("Marion", "Legrand", role = "aut", email="tableau-salt-loire at logrami.fr"),
@@ -8,7 +8,7 @@
Description: Graphical outputs and treatment for a database of fishway
monitoring. It is a part of the STACOMI open source project developed in France
by the French Agency for Biodiversity (AFB) institute to centralize data obtained by fishway monitoring.
- Version 0.5.1 is available in French and English.
+ Version 0.5.2 is available in French and English.
License: GPL (>= 2)
Collate:
'create_generic.r'
Modified: pkg/stacomir/R/BilanEspeces.r
===================================================================
--- pkg/stacomir/R/BilanEspeces.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/BilanEspeces.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -252,7 +252,7 @@
#' @export
interface_BilanEspeces=function(){
bilanEspeces=new("BilanEspeces")
- assign("bilanEspeces",bilanEspeces,envir = .GlobalEnv)
+ assign("bilanEspeces",bilanEspeces,envir = envir_stacomi)
funout(gettext("Summary of encountered species for the counting device\n",domain="R-stacomiR"))
bilanEspeces at dc=charge(bilanEspeces at dc)
bilanEspeces at liste=charge(object=bilanEspeces at liste,
@@ -260,8 +260,9 @@
label=gettext("Choice of cutting",domain="R-stacomiR"))
quitte()
group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
- assign("group",group,envir = .GlobalEnv)
+ assign("group",group,envir = envir_stacomi)
gl=glabel(text=gettext("Species summary",domain="R-stacomiR"),container=group)
+ ggroupboutons<-get("ggroupboutons",envir=envir_stacomi)
add(ggroupboutons,group)
choice(bilanEspeces at horodate,
label=gettext("Start of timestamp",domain="R-stacomiR"),
@@ -278,7 +279,7 @@
choice(bilanEspeces at dc,objectBilan=bilanEspeces,is.enabled=TRUE)
choice(bilanEspeces at liste)
ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
- assign("ggroupboutonsbas",ggroupboutonsbas, envir=.GlobalEnv)
+ assign("ggroupboutonsbas",ggroupboutonsbas, envir=envir_stacomi)
gWidgets::add(ggroupboutons,ggroupboutonsbas)
toolbarlist = list(
Calc=gWidgets::gaction(handler=hBilanEspecescalc, action=bilanEspeces, icon="new", label="calcul", tooltip=gettext("Loading",domain="R-stacomiR")),
@@ -287,10 +288,4 @@
Stat=gWidgets::gaction(handler=hTableBilanEspeces, icon="dataframe", label="stat", tooltip=gettext("Summary tables in .csv and XML",domain="R-stacomiR")),
annuler=gWidgets::gaction(handler= quitte,icon = "close",label=gettext("exit",domain="R-stacomiR"))
)
- #gWidgets::add(ggroupboutonsbas, gtoolbar(toolbarlist))
- #gWidgets::addSpring(group)
- #graphes=ggraphics(width=600,height=400)
- add(ggrouptotal1,graphes ) # on ajoute au groupe horizontal
- dev.new()
- assign("graphes",graphes,envir=.GlobalEnv)
}
\ No newline at end of file
Modified: pkg/stacomir/R/BilanMigration.r
===================================================================
--- pkg/stacomir/R/BilanMigration.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/BilanMigration.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -429,6 +429,7 @@
################################################################
# step plot
################################################################
+ #FIXME problem with negative numbers
} else if (plot.type=="step"){
taxon= as.character(bilanMigration at taxons@data$tax_nom_latin)
stade= as.character(bilanMigration at stades@data$std_libelle)
Modified: pkg/stacomir/R/PasDeTempsJournalier.r
===================================================================
--- pkg/stacomir/R/PasDeTempsJournalier.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/PasDeTempsJournalier.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -71,6 +71,7 @@
funout(gettext("Time steps loaded\n",domain="R-stacomiR"))
#dispose(winpa)
}
+ group<-get("group",envir=envir_stacomi)
winpa=gframe(gettext("Time steps choice (1 year duration)",domain="R-stacomiR"),container=group,horizontal=FALSE)
pg<-glayout(container=winpa)
pg[1,1]<-glabel(gettext("Start date",domain="R-stacomiR"))
Modified: pkg/stacomir/R/PasdeTemps.r
===================================================================
--- pkg/stacomir/R/PasdeTemps.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/PasdeTemps.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -279,6 +279,7 @@
font.attr=c(foreground.colors="red") )
hwinpa(h)
}
+ group<-get("group",envir=envir_stacomi)
winpa=gframe(gettext("Time steps choice",domain="R-stacomiR"),container=group,horizontal=FALSE)
pg<-ggroup(horizontal=FALSE,container=winpa)
glabel(gettext("Starting date",domain="R-stacomiR"),container=pg)
@@ -327,9 +328,7 @@
nbStep=as.numeric(svalue(choicenbStep))
object at stepDuration<-as.numeric(LesPasDeTemps$ValeurPasDeTemps[LesPasDeTemps$LabelPasDeTemps%in%pas])
object at nbStep<-nbStep
- object=setdateDebut(object,svalue(datedeb))
- #print(object at dateDebut)
- #assign("date",svalue(datedeb),envir = .GlobalEnv)
+ object=setdateDebut(object,svalue(datedeb))
add(datedefin,strftime(as.POSIXlt(DateFin(object)),format="%Y-%m-%d %H:%M:%S"),
font.attr=c(foreground.colors="red") )
hwinpa(h)
@@ -337,8 +336,9 @@
hchoicedatedebut=function(h,...){
# TODO to develop
}
+ notebook<-get("notebook",envir=envir_stacomi)
groupdate<-ggroup(container=notebook, label="periode") ## "add" called by constructor this is a tab of the notebook
- assign("groupdate",groupdate,envir=.GlobalEnv)
+ assign("groupdate",groupdate,envir=envir_stacomi)
winpa=gframe(gettext("Time steps choice",domain="R-stacomiR"),container=groupdate,horizontal=FALSE)
pg<-ggroup(horizontal=FALSE,container=winpa)
glabel(gettext("Starting date",domain="R-stacomiR"),container=pg)
Modified: pkg/stacomir/R/RefAnnee.r
===================================================================
--- pkg/stacomir/R/RefAnnee.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefAnnee.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -143,6 +143,7 @@
assign(nomassign,object,envir_stacomi)
funout(funoutlabel)
}
+ group<-get("group",envir=envir_stacomi)
frame_annee<-gframe(titleFrame)
assign("frame_annee",frame_annee,envir=envir_stacomi)
add(group,frame_annee)
Modified: pkg/stacomir/R/RefCheckBox.r
===================================================================
--- pkg/stacomir/R/RefCheckBox.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefCheckBox.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -47,15 +47,13 @@
hlist=function(h,...){
i=h$action
if (exists("refCheckBox",envir_stacomi)) {
- # on recupere les valeurs de l'object assigne precedement
- # car l'object dans .GlobalEnv n'est pas e jour...
object<-get("refCheckBox",envir_stacomi)
}
object at checked[i]<-svalue(the_choice[[i]])
assign("refCheckBox",object,envir_stacomi)
funout(paste("choice",object at labels[i],"\n"))
}
-
+ group<-get("group",envir=envir_stacomi)
frame_check<-gframe(object at title)
assign("frame_check",frame_check,envir=envir_stacomi)
##=>selection de plusieurs caracteristiques
Modified: pkg/stacomir/R/RefChoix.r
===================================================================
--- pkg/stacomir/R/RefChoix.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefChoix.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -16,7 +16,7 @@
selected="integer",
selectedvalue="ANY"),
prototype=list(
- selectedvalue=vector()))
+ selectedvalue=vector()))
#' Loading method for Rechoice referential objects
#'
@@ -59,13 +59,14 @@
assign("refchoice",object,envir_stacomi)
funout(paste(object at label,"\n"))
}
+ group<-get("group",envir=envir_stacomi)
frame_choice<-gframe(object at label)
assign("frame_choice",frame_choice,envir=envir_stacomi)
##=>selection de plusieurs caracteristiques
add(group,frame_choice)
list_libelle=fun_char_spe(object at listechoice)
choice=gradio(items=list_libelle,selected=object at selected,horizontal=TRUE,container=frame_choice,handler=hlist)
- gbutton("OK", container=frame_list,handler=hlist)
+ gbutton("OK", container=frame_choice,handler=hlist)
})
#' Choice_c method for Refchoix referential objects
@@ -111,8 +112,12 @@
svalue(notebook)<-svalue(notebook)+1
}
}
-
- if (!exists("notebook")) notebook <- gnotebook(container=group)
+
+ if (!exists("notebook",envir=envir_stacomi)){
+ notebook <- gnotebook(container=group)
+ } else {
+ notebook<-get("notebook",envir=envir_stacomi)
+ }
groupchoice<-ggroup(container=notebook, label=gettext("options",domain="R-stacomiR"),horizontal=FALSE)
glabel(object at label,container=groupchoice)
list_libelle=fun_char_spe(object at listechoice)
Modified: pkg/stacomir/R/RefDC.r
===================================================================
--- pkg/stacomir/R/RefDC.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefDC.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -135,7 +135,8 @@
addSpring(bg)
gbutton(gettext("close",domain="R-stacomiR"), container=bg, handler = function(h,...) dispose(w))
}
- frame_DC<<-gframe(gettext("Counting devices choice",domain="R-stacomiR"))
+ group<-get("group",envir=envir_stacomi)
+ frame_DC<-gframe(gettext("Counting devices choice",domain="R-stacomiR"))
add(group,frame_DC)
DC_identifiant=object at data$dc
choice=gdroplist(DC_identifiant,container=frame_DC,handler=hDC)
@@ -198,6 +199,7 @@
# "bilanMigrationMult"
assign(get("objectBilan",envir=envir_stacomi),objectBilan,envir=envir_stacomi)
# suppresses all tab larger than (dc)
+
currenttab<-svalue(notebook)
if (length(notebook)>currenttab){
for (i in length(notebook):(currenttab+1)){
@@ -221,10 +223,10 @@
# Handler d'affichage du tableau
# below the widget structure [=> within (=> type
# group(ggroup)[nb(notebook)[groupdc(ggroup&tab)[[frameDCsource(gframe)[tbsourcedc(gtable)],frameDCdest(gframe)[tbdcdest(gtable)]],OKbutton]]
-
+ notebook<-get("notebook",envir=envir_stacomi)
DC=object at data[,c("dc","dis_commentaires","type_dc")]
groupdc<-ggroup(container=notebook, label="dc") ## "add" called by constructor this is a tab of the notebook
- assign("groupdc",groupdc,envir=.GlobalEnv)
+ assign("groupdc",groupdc,envir=envir_stacomi)
frameDCsource<-gframe(gettext("Counting devices choice",domain="R-stacomiR"),container=groupdc)
size(frameDCsource)<-c(250,300)
tbsourcedc = gtable(DC,container=frameDCsource,expand = TRUE, fill = TRUE)
Modified: pkg/stacomir/R/RefDF.r
===================================================================
--- pkg/stacomir/R/RefDF.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefDF.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -98,6 +98,7 @@
addSpring(bg)
gbutton(gettext("close",domain="R-stacomiR"), container=bg, handler = function(h,...) dispose(w))
}
+ group<-get("group",envir=envir_stacomi)
frameDF=gframe(gettext("Fishway choice",domain="R-stacomiR"),container=group)
DF_identifiant=object at data$df
choice=gdroplist(DF_identifiant,container=frameDF,handler=hDF)
Modified: pkg/stacomir/R/RefHorodate.r
===================================================================
--- pkg/stacomir/R/RefHorodate.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefHorodate.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -83,6 +83,7 @@
}
object at horodate<-shiftyear(object at horodate,decal)
}
+ group<-get("group",envir=envir_stacomi)
winhor=gframe(label,container=group,horizontal=FALSE)
pg<-ggroup(horizontal=FALSE,container=winhor)
horodate<-gedit(getRefHorodate(object),container=pg,handler=hwinhor,width=20)
@@ -199,7 +200,8 @@
}
object at horodate<-shiftyear(object at horodate,decal)
}
- if (!exists("notebook")) notebook <- gnotebook(container=group)
+ if (!exists("notebook",envir_stacomi)) notebook <- gnotebook(container=group) else
+ notebook<-get("notebook",envir=envir_stacomi)
grouphorodate<-ggroup(container=notebook, label=label,horizontal=FALSE)
horodate<-gedit(getRefHorodate(object),container=grouphorodate,handler=hhoro,width=20)
gbutton("OK", container=grouphorodate,handler=hhoro,icon="execute")
Modified: pkg/stacomir/R/RefListe.r
===================================================================
--- pkg/stacomir/R/RefListe.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefListe.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -55,6 +55,7 @@
assign("refliste",object,envir_stacomi)
funout(paste(object at label,"\n"))
}
+ group<-get("group",envir=envir_stacomi)
frame_list<<-gframe(object at label)
add(group,frame_list)
list_libelle=fun_char_spe(object at listechoice)
Modified: pkg/stacomir/R/RefStades.r
===================================================================
--- pkg/stacomir/R/RefStades.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefStades.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -131,6 +131,7 @@
}
}
+ group<-get("group",envir=envir_stacomi)
frame_std<<-gframe(gettext("Stage selection",domain="R-stacomiR"))
add(group,frame_std)
std_libelle=fun_char_spe(object at data$std_libelle)
@@ -232,10 +233,11 @@
}
# below the widget structure [=> within (=> type
# group(ggroup)[notebook(notebook)[groupstd(ggroup&tab)[[framestdsource(gframe)[tbsourcestd(gtable)],framestddest(gframe)[tbdeststd(gtable)]],OKbutton]]
- if (!exists("notebook")) notebook <- gnotebook(container=group)
+ if (!exists("notebook",envir=envir_stacomi)) notebook <- gnotebook(container=group) else
+ notebook<-get("notebook",envir=envir_stacomi)
std_libelle=fun_char_spe(object at data$std_libelle)
groupstd<-ggroup()
- assign("goupstd",groupstd,envir=.GlobalEnv)
+ assign("goupstd",groupstd,envir=envir_stacomi)
add(notebook,groupstd,label="stade")
framestdsource<-gframe(gettext("Stage selection",domain="R-stacomiR"),container=groupstd)
tbsourcestd = gtable(std_libelle,container=framestdsource,expand = TRUE, fill = TRUE)
Modified: pkg/stacomir/R/RefStationMesure.r
===================================================================
--- pkg/stacomir/R/RefStationMesure.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefStationMesure.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -71,6 +71,7 @@
funout(gettext("The monitoring stations have been selected\n",domain="R-stacomiR"))
}
}
+ group<-get("group",envir=envir_stacomi)
frame_stationMesure<<-gexpandgroup(title)
add(group,frame_stationMesure)
stm_libelle=fun_char_spe(object at data$stm_libelle)
Modified: pkg/stacomir/R/RefTaxon.r
===================================================================
--- pkg/stacomir/R/RefTaxon.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/RefTaxon.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -88,7 +88,8 @@
choice(objectBilan at stades,objectBilan,is.enabled=TRUE)
}
}
- frame_tax<<-gframe(gettext("Taxon selection",domain="R-stacomiR"))
+ group<-get("group",envir=envir_stacomi)
+ frame_tax<-gframe(gettext("Taxon selection",domain="R-stacomiR"))
add(group,frame_tax)
tax_libelle=fun_char_spe(object at data$tax_nom_latin)
choice=gdroplist(tax_libelle,container=frame_tax,handler=htax)
@@ -147,10 +148,11 @@
}
# below the widget structure [=> within (=> type
# group(ggroup)[notebook(notebook)[grouptaxon(ggroup&tab)[[frametaxonsource(gframe)[tbsourcetaxon(gtable)],frametaxondest(gframe)[tbdtaxondest(gtable)]],OKbutton]]
- if (!exists("notebook")) notebook <- gnotebook(container=group)
+ if (!exists("notebook",envir=envir_stacomi)) notebook <- gnotebook(container=group) else
+ notebook<-get("notebook",envir=envir_stacomi)
tax_libelle=fun_char_spe(object at data$tax_nom_latin)
grouptaxon<-ggroup()
- assign("grouptaxon",grouptaxon,.GlobalEnv)
+ assign("grouptaxon",grouptaxon,envir_stacomi)
add(notebook,grouptaxon,label="taxon")
frametaxonsource<-gframe(gettext("Taxon selection",domain="R-stacomiR"),container=grouptaxon)
tbsourcetaxon = gtable(tax_libelle,container=frametaxonsource,expand = TRUE, fill = TRUE)
Modified: pkg/stacomir/R/Refpar.r
===================================================================
--- pkg/stacomir/R/Refpar.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/Refpar.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -93,7 +93,7 @@
#' @param object An object of class \link{Refpar-class}
#' @param label The label that will be displayed in the message frame or as output text
#' @param nomassign The assignment name in envir_stacomi
-#' @param frameassign The name of the frame used for assignement in .GlobalEnv
+#' @param frameassign The name of the frame used for assignement in envir_stacomi
#' @param is.enabled Default TRUE.
#' @note the choice method assigns an object of class Refpar named refpar in the environment envir_stacomi
#' @note this method choice is also on daughter classes Refparquan, hence the parameters, however it was redefined in refparqual
@@ -121,13 +121,14 @@
funout(gettext("Feature has been selected\n",domain="R-stacomiR"))
}
#frame_par<<-gframe(label)
- assign(frameassign,gframe(label,horizontal=FALSE),envir= .GlobalEnv)
+ assign(frameassign,gframe(label,horizontal=FALSE),envir= envir_stacomi)
# pour pouvoir la supprimer ensuite
- add(group,get(eval(frameassign),envir= .GlobalEnv))
+ group<-get("group",envir=envir_stacomi)
+ add(group,get(eval(frameassign),envir= envir_stacomi))
car_libelle=fun_char_spe(object at data$par_nom)
car_libelle[nchar(car_libelle)>30]<-paste(substr(car_libelle[nchar(car_libelle)>30],1,30),".",sep="")
- choice=gdroplist(items=car_libelle,container=get(eval(frameassign),envir= .GlobalEnv),handler=hcar)
- gbutton("OK", container=get(eval(frameassign),envir= .GlobalEnv),handler=hcar)
+ choice=gdroplist(items=car_libelle,container=get(eval(frameassign),envir= envir_stacomi),handler=hcar)
+ gbutton("OK", container=get(eval(frameassign),envir= envir_stacomi),handler=hcar)
} else funout(gettext("Internal error : unable to load any feature to make the choice\n",domain="R-stacomiR"),arret=TRUE)
})
@@ -209,11 +210,12 @@
}
# below the widget structure [=> within (=> type
# group(ggroup)[notebook(notebook)[groupstd(ggroup&tab)[[framestdsource(gframe)[tbsourcestd(gtable)],framestddest(gframe)[tbdeststd(gtable)]],OKbutton]]
- if (!exists("notebook")) notebook <- gnotebook(container=group)
+ if (!exists("notebook",envir=envir_stacomi)) notebook <- gnotebook(container=group) else
+ notebook<-get("notebook",envir=envir_stacomi)
car_libelle=fun_char_spe(object at data$par_nom)
car_libelle[nchar(car_libelle)>30]<-paste(substr(car_libelle[nchar(car_libelle)>30],1,30),".",sep="")
grouppar<-ggroup()
- assign("gouppar",grouppar,envir=.GlobalEnv)
+ assign("gouppar",grouppar,envir=envir_stacomi)
add(notebook,grouppar,label=label)
frameparsource<-gframe(gettext("Select here",domain="R-stacomiR"),container=grouppar)
tbsourcepar = gtable(car_libelle,container=frameparsource,expand = TRUE, fill = TRUE)
Modified: pkg/stacomir/R/Refparqual.r
===================================================================
--- pkg/stacomir/R/Refparqual.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/Refparqual.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -129,11 +129,12 @@
assign(nomassign,object,envir_stacomi)
funout(gettext("Features have been selected\n",domain="R-stacomiR"))
}
- assign(frameassign,gframe(label),envir= .GlobalEnv)
- add(group,get(eval(frameassign),envir= .GlobalEnv))
+ group<-get("group",envir=envir_stacomi)
+ assign(frameassign,gframe(label),envir= envir_stacomi)
+ add(group,get(eval(frameassign),envir= envir_stacomi))
car_libelle=fun_char_spe(object at data$par_nom)
- choice=gdroplist(items=car_libelle,container=get(eval(frameassign),envir= .GlobalEnv),handler=hcar)
- gbutton("OK", container=get(eval(frameassign),envir= .GlobalEnv),handler=hcar)
+ choice=gdroplist(items=car_libelle,container=get(eval(frameassign),envir= envir_stacomi),handler=hcar)
+ gbutton("OK", container=get(eval(frameassign),envir= envir_stacomi),handler=hcar)
} else stop(gettext("Internal error : unable to load any feature to make the choice\n",domain="R-stacomiR"),arret=TRUE)
})
@@ -174,11 +175,12 @@
}
# below the widget structure [=> within (=> type
# group(ggroup)[notebook(notebook)[groupstd(ggroup&tab)[[framestdsource(gframe)[tbsourcestd(gtable)],framestddest(gframe)[tbdeststd(gtable)]],OKbutton]]
- if (!exists("notebook")) notebook <- gnotebook(container=group)
+ if (!exists("notebook",envir=envir_stacomi)) notebook <- gnotebook(container=group) else
+ notebook<-get("notebook",envir=envir_stacomi)
car_libelle=fun_char_spe(object at data$par_nom)
car_libelle[nchar(car_libelle)>30]<-paste(substr(car_libelle[nchar(car_libelle)>30],1,30),".",sep="")
grouppar<-ggroup()
- assign("gouppar",grouppar,envir=.GlobalEnv)
+ assign("gouppar",grouppar,envir=envir_stacomi)
add(notebook,grouppar,label=gettext("Qualitative",domain="R-stacomiR"))
frameparsource<-gframe(gettext("Select here",domain="R-stacomiR"),container=grouppar)
tbsourcepar = gtable(car_libelle,container=frameparsource,expand = TRUE, fill = TRUE)
Modified: pkg/stacomir/R/ReftextBox.r
===================================================================
--- pkg/stacomir/R/ReftextBox.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/ReftextBox.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -47,9 +47,9 @@
assign(nomassign,object,envir_stacomi)
funout(paste("choice",object at label,"\n"))
}
-
+ group<-get("group",envir=envir_stacomi)
frame_text<-gframe(object at title)
- assign("frame_text",frame_text,.GlobalEnv)
+ assign("frame_text",frame_text,envir_stacomi)
add(group,frame_text)
choice=glabel(text=object at label,container=frame_text,handler=hlist,editable=TRUE)
addhandlerchanged(choice,handler=hlist)
Modified: pkg/stacomir/R/funSousListeBilanMigrationPar.r
===================================================================
--- pkg/stacomir/R/funSousListeBilanMigrationPar.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/funSousListeBilanMigrationPar.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -18,13 +18,6 @@
req=new("RequeteODBC")
req at open<-TRUE
req at baseODBC<-get("baseODBC", envir=envir_stacomi)
-# assign("progres",utils::winProgressBar(title = "cumul val. quant. par pas de temps",
-# label = "progression %",
-# min = 0,
-# max = 1,
-# initial = 0,
-# width = 400),
-# envir = .GlobalEnv)
mygtkProgressBar(title="cumul val. quant. par pas de temps",
progress_text=gettext("Progress %",domain="R-stacomiR"))
Modified: pkg/stacomir/R/interface_BilanAgedemer.r
===================================================================
--- pkg/stacomir/R/interface_BilanAgedemer.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/interface_BilanAgedemer.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -15,7 +15,8 @@
group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
- assign("group",group,envir = .GlobalEnv)
+ assign("group",group,envir = envir_stacomi)
+ ggroupboutons<-get("ggroupboutons",envir=envir_stacomi)
gWidgets::add(ggroupboutons,group)
gl=glabel(text="Bilan age de mer",container=group)
# dans l'ordre
@@ -63,6 +64,6 @@
ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
gWidgets::add(ggroupboutons,ggroupboutonsbas)
gWidgets::add(ggroupboutonsbas, gtoolbar(toolbarlist))
- assign("ggroupboutonsbas",ggroupboutonsbas, envir=.GlobalEnv)
+ assign("ggroupboutonsbas",ggroupboutonsbas, envir=envir_stacomi)
gWidgets::addSpring(group)
}
Modified: pkg/stacomir/R/interface_BilanAnnuels.r
===================================================================
--- pkg/stacomir/R/interface_BilanAnnuels.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/interface_BilanAnnuels.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -20,10 +20,11 @@
group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
- assign("group",group,envir = .GlobalEnv)
+ assign("group",group,envir = envir_stacomi)
+ ggroupboutons<-get("ggroupboutons",envir=envir_stacomi)
add(ggroupboutons,group)
notebook <- gnotebook(container=group)
- assign("notebook",notebook,envir=.GlobalEnv)
+ assign("notebook",notebook,envir=envir_stacomi)
size(notebook)<-c(400,300)
# pour preselectionner une date on lui fournit l'indice de la date dans le RefAnnee. indice = 11 pour 2005
@@ -41,7 +42,7 @@
svalue(notebook)<-1
ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
- assign("ggroupboutonsbas",ggroupboutonsbas,envir=.GlobalEnv)
+ assign("ggroupboutonsbas",ggroupboutonsbas,envir=envir_stacomi)
gWidgets::add(ggroupboutons,ggroupboutonsbas)
toolbarlist = list(
Modified: pkg/stacomir/R/interface_BilanArgentee.r
===================================================================
--- pkg/stacomir/R/interface_BilanArgentee.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/interface_BilanArgentee.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -15,7 +15,8 @@
group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
- assign("group",group,envir = .GlobalEnv)
+ assign("group",group,envir = envir_stacomi)
+ ggroupboutons<-get("ggroupboutons",envir=envir_stacomi)
gWidgets::add(ggroupboutons,group)
gl=glabel(text=gettext("Silver eel summary",domain="R-stacomiR"),container=group)
# dans l'ordre
@@ -73,6 +74,6 @@
ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
gWidgets::add(ggroupboutons,ggroupboutonsbas)
gWidgets::add(ggroupboutonsbas, gtoolbar(toolbarlist))
- assign("ggroupboutonsbas",ggroupboutonsbas, envir=.GlobalEnv)
+ assign("ggroupboutonsbas",ggroupboutonsbas, envir=envir_stacomi)
gWidgets::addSpring(group)
}
Modified: pkg/stacomir/R/interface_BilanConditionEnv.r
===================================================================
--- pkg/stacomir/R/interface_BilanConditionEnv.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/interface_BilanConditionEnv.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -4,33 +4,34 @@
{
quitte()
bilanConditionEnv=new("BilanConditionEnv")
- funout(gettext("Loading of the monitoring stations\n",domain="R-stacomiR"))
- bilanConditionEnv at stationMesure=charge(bilanConditionEnv at stationMesure)
- assign("bilanConditionEnv",bilanConditionEnv,envir=envir_stacomi)
-
- group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
-
- assign("group",group,envir = .GlobalEnv)
- gWidgets::add(ggroupboutons,group)
- choice(bilanConditionEnv at horodatedebut,label=gettext("Begginning",domain="R-stacomiR"),
+ funout(gettext("Loading of the monitoring stations\n",domain="R-stacomiR"))
+ bilanConditionEnv at stationMesure=charge(bilanConditionEnv at stationMesure)
+ assign("bilanConditionEnv",bilanConditionEnv,envir=envir_stacomi)
+
+ group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
+
+ assign("group",group,envir = envir_stacomi)
+ ggroupboutons<-get("ggroupboutons",envir=envir_stacomi)
+ gWidgets::add(ggroupboutons,group)
+ choice(bilanConditionEnv at horodatedebut,label=gettext("Begginning",domain="R-stacomiR"),
nomassign="bilanConditionEnv_date_debut",
funoutlabel=gettext("Beginning date has been chosen\n",domain="R-stacomiR"),
decal=-2)
- choice(bilanConditionEnv at horodatefin,
+ choice(bilanConditionEnv at horodatefin,
label=gettext("End",domain="R-stacomiR"),
nomassign="bilanConditionEnv_date_fin",
funoutlabel=gettext("Ending date has been chosen\n",domain="R-stacomiR"),
decal=-1)
- choice(bilanConditionEnv at stationMesure)
-
- ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
- gWidgets::add(ggroupboutons,ggroupboutonsbas)
- assign("ggroupboutonsbas",ggroupboutonsbas, envir=.GlobalEnv)
-
- toolbarlist = list(
- Graph=gWidgets::gaction(handler=hbilanConditionEnvgraph , icon = "graph",label="graph",tooltip=gettext("Summary graphic",domain="R-stacomiR")),
- annuler=gWidgets::gaction(handler= quitte,icon = "close",label=gettext("Exit",domain="R-stacomiR"),domain="R-stacomiR"))
- gWidgets::add(ggroupboutonsbas, gtoolbar(toolbarlist))
- gWidgets::addSpring(group)
+ choice(bilanConditionEnv at stationMesure)
+
+ ggroupboutonsbas = gWidgets::ggroup(horizontal=FALSE)
+ gWidgets::add(ggroupboutons,ggroupboutonsbas)
+ assign("ggroupboutonsbas",ggroupboutonsbas, envir=envir_stacomi)
+
+ toolbarlist = list(
+ Graph=gWidgets::gaction(handler=hbilanConditionEnvgraph , icon = "graph",label="graph",tooltip=gettext("Summary graphic",domain="R-stacomiR")),
+ annuler=gWidgets::gaction(handler= quitte,icon = "close",label=gettext("Exit",domain="R-stacomiR"),domain="R-stacomiR"))
+ gWidgets::add(ggroupboutonsbas, gtoolbar(toolbarlist))
+ gWidgets::addSpring(group)
dev.new()
}
\ No newline at end of file
Modified: pkg/stacomir/R/interface_BilanFonctionnementDC.r
===================================================================
--- pkg/stacomir/R/interface_BilanFonctionnementDC.r 2017-06-04 16:54:24 UTC (rev 379)
+++ pkg/stacomir/R/interface_BilanFonctionnementDC.r 2017-06-05 20:09:53 UTC (rev 380)
@@ -7,33 +7,33 @@
{
quitte()
bilanFonctionnementDC=new("BilanFonctionnementDC")
- assign("bilanFonctionnementDC",bilanFonctionnementDC,envir=envir_stacomi)
-
- funout(gettext("Loading of the list for fishways and choice of the time step\n",domain="R-stacomiR"))
- bilanFonctionnementDC at dc=charge(bilanFonctionnementDC at dc)
-
- group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
-
- assign("group",group,envir = .GlobalEnv)
-
- gWidgets::add(ggroupboutons,group)
- choice(bilanFonctionnementDC at dc)
- choice(bilanFonctionnementDC at horodatedebut,
+ assign("bilanFonctionnementDC",bilanFonctionnementDC,envir=envir_stacomi)
+
+ funout(gettext("Loading of the list for fishways and choice of the time step\n",domain="R-stacomiR"))
+ bilanFonctionnementDC at dc=charge(bilanFonctionnementDC at dc)
+
+ group <- gWidgets::ggroup(horizontal=FALSE) # doit toujours s'appeller group
+
+ assign("group",group,envir = envir_stacomi)
+ ggroupboutons<-get("ggroupboutons",envir=envir_stacomi)
+ gWidgets::add(ggroupboutons,group)
+ choice(bilanFonctionnementDC at dc)
+ choice(bilanFonctionnementDC at horodatedebut,
label=gettext("Start",domain="R-stacomiR"),
nomassign="bilanFonctionnementDC_date_debut",
funoutlabel=gettext("Beginning date has been chosen\n",domain="R-stacomiR"),
decal=-2)
- choice(bilanFonctionnementDC at horodatefin,
+ choice(bilanFonctionnementDC at horodatefin,
label=gettext("End",domain="R-stacomiR"),
nomassign="bilanFonctionnementDC_date_fin",
funoutlabel=gettext("Ending date has been chosen\n",domain="R-stacomiR"),
decal=-1)
-
- #toolbarlist$Calc$handler = connect(bilanFonctionnementDC)
- #toolbarlist$Calc$icon = "dataframe"
- #getStockIcons(toolkit=guiToolkit())
-
- aBarchart=gWidgets::gaction(label="barchart",
+
+ #toolbarlist$Calc$handler = connect(bilanFonctionnementDC)
+ #toolbarlist$Calc$icon = "dataframe"
+ #getStockIcons(toolkit=guiToolkit())
+
+ aBarchart=gWidgets::gaction(label="barchart",
icon="barplot",
handler=funbarchartDC,
tooltip=gettext("Monthly graph",domain="R-stacomiR"))
@@ -45,11 +45,11 @@
icon="graph2",
handler=funboxDC,
tooltip=gettext("Boxplot",domain="R-stacomiR"))
- aTable=gWidgets::gaction(label=gettext("table",domain="R-stacomiR"),
+ aTable=gWidgets::gaction(label=gettext("table",domain="R-stacomiR"),
icon="dataframe",
handler=funtableDC,
tooltip=gettext("Table",domain="R-stacomiR"))
- aQuit=gWidgets::gaction(label="Quitter",
+ aQuit=gWidgets::gaction(label="Quitter",
icon="close",
handler=quitte,
tooltip=gettext("Exit",domain="R-stacomiR"))
@@ -58,12 +58,12 @@
icon="gtk-info",
tooltip=gettext("code",domain="R-stacomiR"))
toolbarlist <- list(
- barchart=aBarchart,
+ barchart=aBarchart,
barchart1=aBarchart1,
- box= aBox,
- table=aTable,
+ box= aBox,
+ table=aTable,
out=aOut,
- Quit = aQuit)
- add(group, gmenu(toolbarlist))
- gWidgets::addSpring(group)
+ Quit = aQuit)
+ add(group, gmenu(toolbarlist))
+ gWidgets::addSpring(group)
}
\ No newline at end of file
Modified: pkg/stacomir/R/interface_BilanFonctionnementDF.r
===================================================================
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/stacomir -r 380
More information about the Stacomir-commits
mailing list