[Rqda-commits] r61 - pkg pkg/R www
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 16 15:29:52 CET 2009
Author: wincent
Date: 2009-03-16 15:29:51 +0100 (Mon, 16 Mar 2009)
New Revision: 61
Modified:
pkg/ChangeLog
pkg/R/CaseButton.R
pkg/R/CodeCatButton.R
pkg/R/CodesFun.R
pkg/R/Coding_Buttons.R
pkg/R/FileCatButton.R
pkg/R/ProjectButton.R
pkg/TODO
www/index.html
Log:
Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog 2009-03-12 13:25:15 UTC (rev 60)
+++ pkg/ChangeLog 2009-03-16 14:29:51 UTC (rev 61)
@@ -1,3 +1,8 @@
+2009-03-16
+ * The default order of codes is alphabetical.
+ * minor bug of "Add" buttons.
+ * minor modification of OpenProjectButton() to make it more informative.
+
2009-03-12
* Fix minor bug of "Search File..." of popup menu in File Tab.
Modified: pkg/R/CaseButton.R
===================================================================
--- pkg/R/CaseButton.R 2009-03-12 13:25:15 UTC (rev 60)
+++ pkg/R/CaseButton.R 2009-03-16 14:29:51 UTC (rev 61)
@@ -2,7 +2,7 @@
gbutton(label,handler=function(h,...) {
if (is_projOpen(env=.rqda,conName="qdacon")) {
CaseName <- ginput("Enter new Case Name. ", icon="info")
- if (CaseName!="") {
+ if (!is.na(CaseName)) {
Encoding(CaseName) <- "UTF-8"
AddCase(CaseName)
CaseNamesUpdate()
Modified: pkg/R/CodeCatButton.R
===================================================================
--- pkg/R/CodeCatButton.R 2009-03-12 13:25:15 UTC (rev 60)
+++ pkg/R/CodeCatButton.R 2009-03-16 14:29:51 UTC (rev 61)
@@ -37,7 +37,7 @@
gbutton(label,handler=function(h,...) {
if (is_projOpen(env=.rqda,conName="qdacon")) {
item <- ginput("Enter new Code Category. ", icon="info")
- if (item!=""){
+ if (!is.na(item)){
Encoding(item) <- "UTF-8"
AddTodbTable(item,"codecat",Id="catid") ## CODE CATegory
UpdateTableWidget(Widget=.rqda$.CodeCatWidget,FromdbTable="codecat")
Modified: pkg/R/CodesFun.R
===================================================================
--- pkg/R/CodesFun.R 2009-03-12 13:25:15 UTC (rev 60)
+++ pkg/R/CodesFun.R 2009-03-16 14:29:51 UTC (rev 61)
@@ -20,14 +20,14 @@
-CodeNamesUpdate <- function(CodeNamesWidget=.rqda$.codes_rqda,sort=TRUE,decreasing = FALSE,...)
+CodeNamesUpdate <- function(CodeNamesWidget=.rqda$.codes_rqda,sortByTime=TRUE,decreasing = FALSE,...)
{
if (isIdCurrent(.rqda$qdacon)){
- freecode <- dbGetQuery(.rqda$qdacon, "select name, id,date from freecode where status=1")
+ freecode <- dbGetQuery(.rqda$qdacon, "select name, id,date from freecode where status=1 order by lower(name)")
codeName <- freecode$name
if (nrow(freecode)!=0) {
Encoding(codeName) <- "UTF-8"
- if (sort){
+ if (sortByTime){
codeName <- codeName[OrderByTime(freecode$date,decreasing=decreasing)]
}
}
@@ -35,16 +35,16 @@
} else gmessage("Cannot update Code List in the Widget. Project is closed already.\n",con=TRUE)
}
-CodeNamesWidgetUpdate <- function(CodeNamesWidget=.rqda$.codes_rqda,sort=TRUE,decreasing = FALSE,CodeId=NULL,...)
+CodeNamesWidgetUpdate <- function(CodeNamesWidget=.rqda$.codes_rqda,sortByTime=TRUE,decreasing = FALSE,CodeId=NULL,...)
## CodeNamesWidgetUpdate is the alternative function of CodeNamesUpdate, should be used afterwards
{
if (isIdCurrent(.rqda$qdacon)){
- freecode <- dbGetQuery(.rqda$qdacon, "select name, id,date from freecode where status=1")
+ freecode <- dbGetQuery(.rqda$qdacon, "select name, id,date from freecode where status=1 order by lower(name)")
if (nrow(freecode)!=0) {
if (!is.null(CodeId)) {freecode <- freecode[freecode$id %in% CodeId,]}
codeName <- freecode$name
Encoding(codeName) <- "UTF-8"
- if (sort){
+ if (sortByTime){
codeName <- codeName[OrderByTime(freecode$date,decreasing=decreasing)]
}
}
Modified: pkg/R/Coding_Buttons.R
===================================================================
--- pkg/R/Coding_Buttons.R 2009-03-12 13:25:15 UTC (rev 60)
+++ pkg/R/Coding_Buttons.R 2009-03-16 14:29:51 UTC (rev 61)
@@ -3,10 +3,10 @@
handler=function(h,...) {
if (is_projOpen(env=.rqda,conName="qdacon")) {
codename <- ginput("Enter new code. ", icon="info")
- if (codename!=""){
+ if (!is.na(codename)){
Encoding(codename) <- "UTF-8"
addcode(codename)
- CodeNamesUpdate()
+ CodeNamesUpdate(sortByTime=FALSE)
}
}
}
@@ -30,7 +30,7 @@
## set status in table freecode to 0
dbGetQuery(.rqda$qdacon,sprintf("update coding set status=0 where cid==%i",cid))
## set status in table coding to 0
- CodeNamesUpdate()
+ CodeNamesUpdate(sortByTime=FALSE)
}
}
}
@@ -322,7 +322,7 @@
## update the name in source table by a function
rename(selectedCodeName,NewCodeName,"freecode")
## (name is the only field should be modifed, as other table use ID rather than name)
- CodeNamesUpdate()
+ CodeNamesUpdate(sortByTime=FALSE)
}
}
}
@@ -339,7 +339,7 @@
}
CodesNamesWidgetMenu$"Sort by created time (all codes)"$handler <- function(h, ...) {
if (is_projOpen(env = .rqda, conName = "qdacon", message = FALSE)) {
- CodeNamesUpdate()
+ CodeNamesUpdate(sortByTime=TRUE)
}
}
CodesNamesWidgetMenu$"Show Codes With Memo"$handler <- function(h, ...) {
@@ -347,7 +347,7 @@
cid <- dbGetQuery(.rqda$qdacon,"select id from freecode where memo is not null")
if (nrow(cid)!=0) {
cid <- cid[[1]]
- CodeNamesWidgetUpdate(CodeNamesWidget=.rqda$.codes_rqda,CodeId=cid)
+ CodeNamesWidgetUpdate(CodeNamesWidget=.rqda$.codes_rqda,CodeId=cid,sortByTime=FALSE)
} else gmessage("No Code with memo.",con=TRUE)
}
}
@@ -356,7 +356,7 @@
cid <- dbGetQuery(.rqda$qdacon,"select id from freecode where memo is null")
if (nrow(cid)!=0) {
cid <- cid[[1]]
- CodeNamesWidgetUpdate(CodeNamesWidget=.rqda$.codes_rqda,CodeId=cid)
+ CodeNamesWidgetUpdate(CodeNamesWidget=.rqda$.codes_rqda,CodeId=cid,sortByTime=FALSE)
} else gmessage("No Code with memo.",con=TRUE)
}
}
Modified: pkg/R/FileCatButton.R
===================================================================
--- pkg/R/FileCatButton.R 2009-03-12 13:25:15 UTC (rev 60)
+++ pkg/R/FileCatButton.R 2009-03-16 14:29:51 UTC (rev 61)
@@ -3,7 +3,7 @@
gbutton(label,handler=function(h,...) {
if (is_projOpen(env=.rqda,conName="qdacon")) {
item <- ginput("Enter new File Category. ", icon="info")
- if (item != ""){
+ if (!is.na(item)){
Encoding(item) <- "UTF-8"
AddTodbTable(item,"filecat",Id="catid") ## FILE CATegory
UpdateTableWidget(Widget=.rqda$.FileCatWidget,FromdbTable="filecat")
Modified: pkg/R/ProjectButton.R
===================================================================
--- pkg/R/ProjectButton.R 2009-03-12 13:25:15 UTC (rev 60)
+++ pkg/R/ProjectButton.R 2009-03-16 14:29:51 UTC (rev 61)
@@ -11,12 +11,12 @@
OpenProjectButton <- function(container){
gbutton("Open Project",container=container,handler=function(h,...){
- path <- gfile(type="open",filter=list("rqda"=list(patterns = c("*.rqda")),
+ path <- gfile(text = "Select a *.rqda file and click OK.",type="open",filter=list("rqda"=list(patterns = c("*.rqda")),
"All files" = list(patterns = c("*"))))
if (path!=""){
Encoding(path) <- "UTF-8"
open_proj(path,assignenv=.rqda)
- tryCatch(CodeNamesUpdate(),error=function(e){})
+ tryCatch(CodeNamesUpdate(sortByTime=FALSE),error=function(e){})
tryCatch(FileNamesUpdate(),error=function(e){})
tryCatch(CaseNamesUpdate(),error=function(e){})
tryCatch(UpdateTableWidget(Widget=.rqda$.CodeCatWidget,FromdbTable="codecat"),error=function(e){})
Modified: pkg/TODO
===================================================================
--- pkg/TODO 2009-03-12 13:25:15 UTC (rev 60)
+++ pkg/TODO 2009-03-16 14:29:51 UTC (rev 61)
@@ -6,3 +6,7 @@
export C-Cat to mm format http://freemind.sourceforge.net/wiki/index.php/File_format
or just use igraph package to plot a relationship plot
+
+Attributes/Variable of Case
+
+In cases Tab, update "files of this case" after marking a file.
\ No newline at end of file
Modified: www/index.html
===================================================================
--- www/index.html 2009-03-12 13:25:15 UTC (rev 60)
+++ www/index.html 2009-03-16 14:29:51 UTC (rev 61)
@@ -87,7 +87,7 @@
<p>HUANG Ronggui (2008). RQDA: R-based Qualitative Data Analysis. R package version 0.1.6. http://rqda.r-forge.r-project.org/
<h1>What's new in the latest version?</h1>
-<p>RQDA is now on <A href ="http://cran.r-project.org/web/packages/RQDA/index.html" target="_blank">CRAN</a>.
+<p>RQDA is now on <A href ="http://cran.r-project.org/web/packages/RQDA/index.html" target="_blank">CRAN</a>(2008-12-26).
<p>RQDA has been actively developed. You can click <A HREF="ChangeLog.txt">here</A> to see the new features.
<h1>More Informaiton</h1>
More information about the Rqda-commits
mailing list