[rkward-cvs] SF.net SVN: rkward-code:[4808] trunk/rkward

tfry at users.sf.net tfry at users.sf.net
Sat Sep 6 18:36:40 UTC 2014


Revision: 4808
          http://sourceforge.net/p/rkward/code/4808
Author:   tfry
Date:     2014-09-06 18:36:38 +0000 (Sat, 06 Sep 2014)
Log Message:
-----------
More consistency between varslot and valueslot, and a fix

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/plugin/rkvarslot.cpp
    trunk/rkward/rkward/plugins/testing/valueselect1.js

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2014-09-06 14:40:32 UTC (rev 4807)
+++ trunk/rkward/ChangeLog	2014-09-06 18:36:38 UTC (rev 4808)
@@ -15,9 +15,8 @@
 - Allow to connect <varslot>/<valueslot> source to any property, not just <varselectors>
 	TODO: document
 - New plugin elements <valueselector> and <select>
-	TODO: finish them, document them, allow to fill <valueselector> from R expression
+	TODO: allow to fill <valueselector> from R expression
 - New plugin element <valueslot> for selecting arbitrary string values (otherwise almost identical to <varslot>)
-	TODO: document, complement with valueselector (sort of pointless without)
 - <varslots> can be set to accept the same object several times. Used in scatterplot plugin.
 - New R function rk.embed.device() for manually embedding graphics devices in RKWard
 - Fixed: R backend would exit immediately, without meaningful error message, if there is an error in .Rprofile (or Rprofile.site)

Modified: trunk/rkward/rkward/plugin/rkvarslot.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkvarslot.cpp	2014-09-06 14:40:32 UTC (rev 4807)
+++ trunk/rkward/rkward/plugin/rkvarslot.cpp	2014-09-06 18:36:38 UTC (rev 4808)
@@ -102,7 +102,7 @@
 		static_cast<RKComponentPropertyRObjects*> (available)->setTypeFilter (xml->getStringAttribute (element, "types", QString::null, DL_INFO).split (" ", QString::SkipEmptyParts));
 		static_cast<RKComponentPropertyRObjects*> (available)->setDimensionFilter (xml->getIntAttribute (element, "num_dimensions", 0, DL_INFO), xml->getIntAttribute (element, "min_length", 0, DL_INFO), xml->getIntAttribute (element, "max_length", INT_MAX, DL_INFO));
 	}
-	available->setStripDuplicates (!xml->getBoolAttribute (element, "allow_duplicates", mode == Valueslot, DL_INFO));
+	available->setStripDuplicates (!xml->getBoolAttribute (element, "allow_duplicates", false, DL_INFO));
 
 	connect (available, SIGNAL (valueChanged (RKComponentPropertyBase *)), this, SLOT (availablePropertyChanged (RKComponentPropertyBase *)));
 	availablePropertyChanged (available);		// initialize
@@ -201,7 +201,7 @@
 		int len = source->listLength ();
 		for (int i = 0; i < len; ++i) {
 			if (mode == Valueslot) {
-				static_cast<RKComponentPropertyStringList*> (available)->setValueAt (i, static_cast<RKComponentPropertyStringList*> (source)->valueAt (i));
+				static_cast<RKComponentPropertyStringList*> (available)->setValueAt (static_cast<RKComponentPropertyStringList*> (available)->listLength (), static_cast<RKComponentPropertyStringList*> (source)->valueAt (i));
 			} else {
 				static_cast<RKComponentPropertyRObjects*> (available)->addObjectValue (static_cast<RKComponentPropertyRObjects*> (source)->objectAt (i));
 			}

Modified: trunk/rkward/rkward/plugins/testing/valueselect1.js
===================================================================
--- trunk/rkward/rkward/plugins/testing/valueselect1.js	2014-09-06 14:40:32 UTC (rev 4807)
+++ trunk/rkward/rkward/plugins/testing/valueselect1.js	2014-09-06 18:36:38 UTC (rev 4808)
@@ -1,9 +1,7 @@
 function calculate () {
 	echo (getList ("select").join ("\n"));
 	echo ("\n\n");
-	echo (getList ("valueselect.labeled").join ("\n"));
+	echo (getList ("valueslot").join ("\n"));
 	echo ("\n\n");
-	echo (getList ("valueselect.selected").join ("\n"));
-	echo ("\n\n");
 }
 





More information about the rkward-tracker mailing list