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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Oct 19 12:34:38 UTC 2006


Revision: 881
          http://svn.sourceforge.net/rkward/?rev=881&view=rev
Author:   tfry
Date:     2006-10-19 05:34:18 -0700 (Thu, 19 Oct 2006)

Log Message:
-----------
Most object structure updates are done in a command chain; update object data on changes

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/core/renvironmentobject.cpp
    trunk/rkward/rkward/core/renvironmentobject.h
    trunk/rkward/rkward/core/rkvariable.cpp
    trunk/rkward/rkward/core/rkvariable.h
    trunk/rkward/rkward/core/robject.cpp
    trunk/rkward/rkward/core/robject.h
    trunk/rkward/rkward/core/robjectlist.cpp
    trunk/rkward/rkward/core/robjectlist.h
    trunk/rkward/rkward/dataeditor/celleditor.cpp
    trunk/rkward/rkward/plugin/rkvarselector.cpp
    trunk/rkward/rkward/rbackend/rinterface.cpp
    trunk/rkward/rkward/rbackend/rthread.cpp
    trunk/rkward/rkward/rbackend/rthread.h
    trunk/rkward/rkward/robjectbrowser.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/ChangeLog	2006-10-19 12:34:18 UTC (rev 881)
@@ -1,4 +1,5 @@
-- fixed: back / forward buttons would sometimes remain after closing a help window 
+- object data changed in the console (or by other means) is updated to the editor automatically, if the object is opened for editing
+- fixed: back / forward buttons would sometimes remain after closing a help window
 - fix some focus problems
 - provide close buttons in tab bar
 

Modified: trunk/rkward/rkward/core/renvironmentobject.cpp
===================================================================
--- trunk/rkward/rkward/core/renvironmentobject.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/core/renvironmentobject.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -70,14 +70,14 @@
 	RContainerObject::writeMetaData (chain);
 }
 
-void REnvironmentObject::updateFromR () {
+void REnvironmentObject::updateFromR (RCommandChain *chain) {
 	RK_TRACE (OBJECTS);
 	QString options;
 	if (type & GlobalEnv) options = ", envlevel=-1";	// in the .GlobalEnv recurse one more level
 	if (type & ToplevelEnv) options.append (", namespacename=" + rQuote (namespace_name));
 
 	RCommand *command = new RCommand (".rk.get.structure (" + getFullName () + ", " + rQuote (getShortName ()) + options + ")", RCommand::App | RCommand::Sync | RCommand::GetStructuredData, QString::null, this, ROBJECT_UDPATE_STRUCTURE_COMMAND);
-	RKGlobals::rInterface ()->issueCommand (command, RObjectList::getObjectList ()->getUpdateCommandChain ());
+	RKGlobals::rInterface ()->issueCommand (command, chain);
 }
 
 bool REnvironmentObject::updateStructure (RData *new_data) {

Modified: trunk/rkward/rkward/core/renvironmentobject.h
===================================================================
--- trunk/rkward/rkward/core/renvironmentobject.h	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/core/renvironmentobject.h	2006-10-19 12:34:18 UTC (rev 881)
@@ -32,7 +32,7 @@
 	REnvironmentObject (RContainerObject *parent, const QString &name);
 	~REnvironmentObject ();
 
-	void updateFromR ();
+	void updateFromR (RCommandChain *chain);
 
 	QString getFullName ();
 	QString makeChildName (const QString &short_child_name, bool misplaced=false);

Modified: trunk/rkward/rkward/core/rkvariable.cpp
===================================================================
--- trunk/rkward/rkward/core/rkvariable.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/core/rkvariable.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -122,7 +122,7 @@
 		RK_ASSERT (levels->getDataType () == RData::StringVector);
 		unsigned int levels_len = levels->getDataLength ();
 		RK_ASSERT (levels_len >= 1);
-		RK_ASSERT (!myData ()->value_labels);
+		delete myData ()->value_labels;
 		myData ()->value_labels = new RObject::ValueLabels;
 		if ((levels_len == 1) && levels->getStringVector ()[0].isEmpty ()) {
 			// no levels
@@ -151,6 +151,7 @@
 		}
 
 		// now set the invalid fields (only if they are still NAs in the R data)
+		myData ()->invalid_fields.clear ();
 		if (invalids->getDataLength () <= 1) {
 			// no invalids
 		} else {
@@ -165,12 +166,14 @@
 				}
 			}
 		}
+		myData ()->formatting_options = parseFormattingOptionsString (getMetaProperty ("format"));
 
 		ChangeSet *set = new ChangeSet;
 		set->from_index = 0;
 		set->to_index = getLength ();
 		RKGlobals::tracker ()->objectDataChanged (this, set);
 		RKGlobals::tracker ()->objectMetaChanged (this);
+		myData ()->dirty = false;
 		setSyncing (true);
 	} else {
 		RK_ASSERT (false);
@@ -208,7 +211,8 @@
 	myData ()->formatting_options = 0;
 	myData ()->previously_valid = true;
 	myData ()->invalid_fields.setAutoDelete (true);
-	
+	myData ()->dirty = false;
+
 	extendToLength (getLength ());
 
 	for (int i = 0; i < getLength (); ++i) {
@@ -232,20 +236,22 @@
 }
 
 // virtual
-void RKVariable::initializeEditData (bool to_empty) {
+void RKVariable::initializeEditDataToEmpty () {
 	RK_TRACE (OBJECTS);
 	RK_ASSERT (myData ());
 	
-	if (to_empty) {
-		for (int row=0; row < getLength (); ++row) {
-			myData ()->cell_states[row] = RKVarEditData::NA;
-		}
-	} else {
-		RKGlobals::rInterface ()->issueCommand (".rk.get.vector.data (" + getFullName () + ")", RCommand::App | RCommand::Sync | RCommand::GetStructuredData, QString::null, this, GET_DATA_COMMAND);
-		myData ()->formatting_options = parseFormattingOptionsString (getMetaProperty ("format"));
+	for (int row=0; row < getLength (); ++row) {
+		myData ()->cell_states[row] = RKVarEditData::NA;
 	}
 }
 
+void RKVariable::updateDataFromR (RCommandChain *chain) {
+	RK_TRACE (OBJECTS);
+	RK_ASSERT (myData ());
+
+	RKGlobals::rInterface ()->issueCommand (".rk.get.vector.data (" + getFullName () + ")", RCommand::App | RCommand::Sync | RCommand::GetStructuredData, QString::null, this, GET_DATA_COMMAND, chain);
+}
+
 // virtual
 void RKVariable::discardEditData () {
 	RK_TRACE (OBJECTS);

Modified: trunk/rkward/rkward/core/rkvariable.h
===================================================================
--- trunk/rkward/rkward/core/rkvariable.h	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/core/rkvariable.h	2006-10-19 12:34:18 UTC (rev 881)
@@ -57,6 +57,8 @@
 	void setSyncing (bool immediate);
 /** syncs pending data changes to the backend */
 	void syncDataToR ();
+/** reimplemented from RObject */
+	void updateDataFromR (RCommandChain *chain);
 	
 /** get the value at the given row in text-form - regardless of the storage mode.
 @param pretty: get the text in pretty form, e.g. rounding numbers to a certain number of digits, replacing numeric values with value labels if available, etc. Formatting is done according to the meta-information stored in the RObject and global user preferences */
@@ -168,7 +170,7 @@
 /** reimplemented from RObject */
 	void allocateEditData ();
 /** reimplemented from RObject */
-	void initializeEditData (bool to_empty=false);
+	void initializeEditDataToEmpty ();
 /** reimplemented from RObject */
 	void discardEditData ();
 private:

Modified: trunk/rkward/rkward/core/robject.cpp
===================================================================
--- trunk/rkward/rkward/core/robject.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/core/robject.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -235,11 +235,11 @@
 	type |= HasMetaObject;
 }
 
-void RObject::updateFromR () {
+void RObject::updateFromR (RCommandChain *chain) {
 	RK_TRACE (OBJECTS);
 
 	RCommand *command = new RCommand (".rk.get.structure (" + getFullName () + ", " + rQuote (getShortName ()) + ")", RCommand::App | RCommand::Sync | RCommand::GetStructuredData, QString::null, this, ROBJECT_UDPATE_STRUCTURE_COMMAND);
-	RKGlobals::rInterface ()->issueCommand (command, RObjectList::getObjectList ()->getUpdateCommandChain ());
+	RKGlobals::rInterface ()->issueCommand (command, chain);
 }
 
 void RObject::rCommandDone (RCommand *command) {
@@ -280,10 +280,31 @@
 	properties_change = updateDimensions (new_data->getStructureVector ()[4]);
 
 	if (properties_change) RKGlobals::tracker ()->objectMetaChanged (this);
+	if (data && (data->dirty)) updateDataFromR (0);
 
 	return true;
 }
 
+//virtual
+void RObject::updateDataFromR (RCommandChain *) {
+	RK_TRACE (OBJECTS);
+	RK_ASSERT (data);
+	data->dirty = false;
+}
+
+void RObject::markDataDirty () {
+	RK_TRACE (OBJECTS);
+
+	if (data) data->dirty = true;
+	unsigned int ccount = numChildren ();
+	if (!ccount) return;
+
+	RObject **childcopy = children ();
+	for (unsigned int i = 0; i < ccount; ++i) {
+		childcopy[i]->markDataDirty ();
+	}
+}
+
 bool RObject::canAccommodateStructure (RData *new_data) {
 	RK_TRACE (OBJECTS);
 	RK_ASSERT (new_data->getDataLength () >= 5);
@@ -510,7 +531,7 @@
 	if (opened) {
 		if (!data) {
 			allocateEditData ();
-			initializeEditData (false);
+			updateDataFromR (0);
 		}
 		data->editor = editor;
 	} else {
@@ -526,7 +547,7 @@
 
 	if (!data) {
 		allocateEditData ();
-		initializeEditData (true);
+		initializeEditDataToEmpty ();
 	}
 	data->editor = editor;
 }
@@ -539,10 +560,11 @@
 	RK_ASSERT (!data);
 	
 	data = new EditData;
+	data->dirty = false;
 }
 
 // virtual
-void RObject::initializeEditData (bool) {
+void RObject::initializeEditDataToEmpty () {
 	RK_TRACE (OBJECTS);
 }
 

Modified: trunk/rkward/rkward/core/robject.h
===================================================================
--- trunk/rkward/rkward/core/robject.h	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/core/robject.h	2006-10-19 12:34:18 UTC (rev 881)
@@ -93,7 +93,11 @@
 	bool hasMetaObject () { return (type & HasMetaObject); };
 
 /** trigger an update of this and all descendent objects */
-	virtual void updateFromR ();
+	virtual void updateFromR (RCommandChain *chain);
+/** fetch updated data from the backend. Default implementation does nothing except clearing the dirty flag */
+	virtual void updateDataFromR (RCommandChain *chain);
+/** mark the data of this object and all of its children as dirty (recursively). Dirty data will be updated *after* the new structure update (if the object is opened for editing) */
+	void markDataDirty ();
 
 	bool canEdit ();
 	bool canRead ();
@@ -227,18 +231,18 @@
 @param new_data The command. Make sure it really is the dims field of an .rk.get.structure-command to update classes *before* calling this function! WARNING: the new_data object may get changed during this call. Call canAccommodateStructure () before calling this function!
 @returns whether this caused any changes */
 	bool updateDimensions (RData *new_data);
-
 /** an instance of this struct is created, when the object is opened for editing. For one thing, it keeps track of which editor(s) are working on the object.
 In subclasses like RKVariable, the struct is extended to additionally hold the data of the object, etc. */
 	struct EditData {
 		RKEditor *editor;
+		bool dirty;
 	};
 /** see EditData. 0 if the object is not being edited. */
 	EditData *data;
 /** see EditData. Allocates the data member. To be reimplemented in classes that need more information in the EditData struct */
 	virtual void allocateEditData ();
-/** companion to allocateEditData (). Fetches all necessary information (data) for this object if to_empty==false. Else initializes the data to empty (NA). Default implementation does nothing. Reimplemented in derived classes. */
-	virtual void initializeEditData (bool to_empty=false);
+/** companion to allocateEditData (). Initializes the data to empty (NA). Default implementation does nothing. Reimplemented in derived classes. */
+	virtual void initializeEditDataToEmpty ();
 /** see above */
 	virtual void discardEditData ();
 

Modified: trunk/rkward/rkward/core/robjectlist.cpp
===================================================================
--- trunk/rkward/rkward/core/robjectlist.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/core/robjectlist.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -60,7 +60,7 @@
 	RK_TRACE (OBJECTS);
 }
 
-void RObjectList::updateFromR () {
+void RObjectList::updateFromR (RCommandChain *chain) {
 	RK_TRACE (OBJECTS);
 	if (update_chain) {
 		// gee, looks like another update is still on the way. lets schedule one for later:
@@ -70,7 +70,7 @@
 	}
 
 	emit (updateStarted ());
-	update_chain = RKGlobals::rInterface ()->startChain (0);
+	update_chain = RKGlobals::rInterface ()->startChain (chain);
 
 	RCommand *command = new RCommand ("search ()", RCommand::App | RCommand::Sync | RCommand::GetStringVector, QString::null, this, ROBJECTLIST_UDPATE_ENVIRONMENTS_COMMAND);
 	RKGlobals::rInterface ()->issueCommand (command, update_chain);
@@ -133,7 +133,7 @@
 			RObject *obj = childmap[name];
 			// for now, we only update the .GlobalEnv. All others we assume to be static
 			if (obj->isType (GlobalEnv)) {
-				obj->updateFromR ();
+				obj->updateFromR (update_chain);
 			}
 		}
 	}
@@ -158,7 +158,7 @@
 
 	childmap.insert (name, envobj);
 	RKGlobals::tracker ()->addObject (envobj, 0);
-	envobj->updateFromR ();
+	envobj->updateFromR (update_chain);
 
 	return envobj;
 }
@@ -221,7 +221,7 @@
 void RObjectList::timeout () {
 	RK_TRACE (OBJECTS);
 
-	updateFromR ();
+	updateFromR (0);
 }
 
 QString RObjectList::renameChildCommand (RObject *object, const QString &new_name) {

Modified: trunk/rkward/rkward/core/robjectlist.h
===================================================================
--- trunk/rkward/rkward/core/robjectlist.h	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/core/robjectlist.h	2006-10-19 12:34:18 UTC (rev 881)
@@ -45,15 +45,13 @@
 	RObjectList ();
 	~RObjectList ();
 
-	void updateFromR ();
+	void updateFromR (RCommandChain *chain);
 	
 	QString getFullName () { return QString::null; };
 	QString makeChildName (const QString &short_child_name, bool) { return short_child_name; };
 	/** reimplemented from RContainerObject: do nothing. The object-list has no meta data. */
 	void writeMetaData (RCommandChain *) {};
 	
-	RCommandChain *getUpdateCommandChain () { return update_chain; };
-
 	/** reimplemented from RContainerObject to search the environments in search order */
 	RObject *findObject (const QString &name, bool canonified=false);
 

Modified: trunk/rkward/rkward/dataeditor/celleditor.cpp
===================================================================
--- trunk/rkward/rkward/dataeditor/celleditor.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/dataeditor/celleditor.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -104,7 +104,7 @@
 				return;
 			}
 		} else if (e->key () == Qt::Key_Right) {
-			if (cursorPosition () >= text ().length ()) {
+			if (cursorPosition () >= (int) text ().length ()) {
 				table->keyPressEvent (e);
 				return;
 			}

Modified: trunk/rkward/rkward/plugin/rkvarselector.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkvarselector.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/plugin/rkvarselector.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -36,7 +36,6 @@
 	addChild ("available", available = new RKComponentPropertyRObjects (this, false));
 	addChild ("selected", selected = new RKComponentPropertyRObjects (this, false));
 
-	RObjectList::getObjectList ()->updateFromR ();
 	QVBoxLayout  *vbox = new QVBoxLayout (this, RKGlobals::spacingHint ());
 	
 	QLabel *label = new QLabel (element.attribute ("label", "Select Variable(s)"), this);

Modified: trunk/rkward/rkward/rbackend/rinterface.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rinterface.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/rbackend/rinterface.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -164,25 +164,11 @@
 		RKwardApp::getApp ()->setRStatus (true);
 	} else if ((e->type () == RSEARCHLIST_CHANGED_EVENT)) {
 		RK_DO (qDebug ("triggering update of object list"), RBACKEND, DL_DEBUG);
-		RObjectList::getObjectList ()->updateFromR ();
+		RObjectList::getObjectList ()->updateFromR (0);
 	} else if ((e->type () == RGLOBALENV_SYMBOLS_CHANGED_EVENT)) {
 		RK_DO (qDebug ("triggering update of globalenv"), RBACKEND, DL_DEBUG);
 		// TODO: maybe this should be put inside a chain
-		RObjectList::getGlobalEnv ()->updateFromR ();
-	} else if ((e->type () == RINDIVIDUAL_SYMBOLS_CHANGED_EVENT)) {
-		RK_DO (qDebug ("triggering update of some symbols"), RBACKEND, DL_DEBUG);
-		QStringList *list = static_cast <QStringList *> (e->data ());
-		for (QStringList::const_iterator it = list->constBegin (); it != list->constEnd (); ++it) {
-			RObject *obj = RObjectList::getGlobalEnv ()->findObject (*it);
-			if (obj) {
-				// TODO: maybe this should be put inside a chain
-				RK_DO (qDebug ("update triggered for %s", (*it).latin1 ()), RBACKEND, DL_DEBUG);
-				obj->updateFromR ();
-			} else {
-				RK_DO (qDebug ("lookup failed for changed symbol %s", (*it).latin1 ()), RBACKEND, DL_WARNING);
-			}
-		}
-		delete list;
+		RObjectList::getGlobalEnv ()->updateFromR (0);
 	} else if ((e->type () == R_EVAL_REQUEST_EVENT)) {
 		r_thread->pauseOutput (false); // we may be recursing downwards into event loops here. Hence we need to make sure, we don't create a deadlock
 		processREvalRequest (static_cast<REvalRequest *> (e->data ()));
@@ -280,6 +266,7 @@
 	// clear reply object
 	issueCommand (".rk.rkreply <- NULL", RCommand::App | RCommand::Sync, QString::null, 0, 0, request->in_chain);
 	if (!request->call_length) {
+		RK_ASSERT (false);
 		closeChain (request->in_chain);
 		return;
 	}
@@ -304,23 +291,19 @@
 		// TODO: make more generic, get filename sanely
 		issueCommand (".rk.rkreply <- \"" + dir.filePath ("rk_out.html") + "\"", RCommand::App | RCommand::Sync, QString::null, 0, 0, request->in_chain);
 	} else if (call == "sync") {
-		RObject *obj = 0;
-		if (request->call_length >= 2) {
-			QString object_name = request->call[1];
-			obj = RObjectList::getObjectList ()->findObject (object_name);
+		RK_ASSERT (request->call_length >= 2);
+
+		for (int i = 1; i < request->call_length; ++i) {
+			QString object_name = request->call[i];
+			RObject *obj = RObjectList::getObjectList ()->findObject (object_name);
+			if (obj) {
+				RK_DO (qDebug ("triggering update for symbol %s", object_name.latin1 ()), RBACKEND, DL_DEBUG);
+				obj->markDataDirty ();
+				obj->updateFromR (request->in_chain);
+			} else {
+				RK_DO (qDebug ("lookup failed for changed symbol %s", object_name.latin1 ()), RBACKEND, DL_WARNING);
+			}
 		}
-		if (obj) {
-			RObject::ChangeSet *set = new RObject::ChangeSet;
-			set->from_index = -1;
-			set->to_index = -1;
-			// for now a complete update is needed, in case new objects were added
-			RObjectList::getObjectList ()->updateFromR ();
-			RKGlobals::tracker ()->objectDataChanged (obj, set);
-			
-			issueCommand (".rk.rkreply <- \"Sync scheduled for object '" + obj->getFullName () + "'\"", RCommand::App | RCommand::Sync, QString::null, 0, 0, request->in_chain);
-		} else {
-			issueCommand (".rk.rkreply <- \"Object not recognized or not specified in call to sync. Ignoring\"", RCommand::App | RCommand::Sync, QString::null, 0, 0, request->in_chain);
-		}
 	} else if (call == "require") {
 		if (request->call_length >= 2) {
 			QString lib_name = request->call[1];

Modified: trunk/rkward/rkward/rbackend/rthread.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rthread.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/rbackend/rthread.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -103,6 +103,7 @@
 			if (command) {
 				// mutex will be unlocked inside
 				doCommand (command);
+				checkObjectUpdatesNeeded (command->type () & (RCommand::User | RCommand::ObjectListUpdate));
 				processX11Events ();
 			}
 		
@@ -213,9 +214,6 @@
 		flushOutput ();
 	}
 
-	// step 3: cleanup
-	checkObjectUpdatesNeeded (command->type () & (RCommand::User | RCommand::ObjectListUpdate));
-
 	// notify GUI-thread that command was finished
 	event = new QCustomEvent (RCOMMAND_OUT_EVENT);
 	event->setData (command);
@@ -530,17 +528,24 @@
 	if (search_update_needed || globalenv_update_needed) {
 		RK_DO (qDebug ("checkObjectUpdatesNeeded: updating watches"), RBACKEND, DL_TRACE);
 		runCommandInternal (".rk.watch.globalenv ()\n", &error);
-	} else {
-		// TODO: maybe this has to be done outside the parent if: We may want to also check wether the modified objects are opened, and, if so, update their data
-		if (!changed_symbol_names.isEmpty ()) {
-			QStringList *copy = new QStringList (changed_symbol_names);
-			QCustomEvent *event = new QCustomEvent (RINDIVIDUAL_SYMBOLS_CHANGED_EVENT);
-			event->setData (copy);
-			qApp->postEvent (RKGlobals::rInterface (), event);
+	}
+
+	if (!changed_symbol_names.isEmpty ()) {
+		int call_length = changed_symbol_names.count () + 1;
+		QString *call = new QString[call_length];
+		call[0] = "sync";
+		int i = 1;
+		for (QStringList::const_iterator it = changed_symbol_names.constBegin (); it != changed_symbol_names.constEnd (); ++it) {
+			call[i++] = *it;
 		}
+		RK_ASSERT (i == call_length);
+		MUTEX_UNLOCK;
+		handleSubstackCall (call, call_length);
+		MUTEX_LOCK;
+		delete call;
+		changed_symbol_names.clear ();
 	}
 
-	changed_symbol_names.clear ();
 }
 
 QString *stringsToStringList (char **strings, int count) {

Modified: trunk/rkward/rkward/rbackend/rthread.h
===================================================================
--- trunk/rkward/rkward/rbackend/rthread.h	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/rbackend/rthread.h	2006-10-19 12:34:18 UTC (rev 881)
@@ -40,7 +40,6 @@
 #define RSTARTUP_ERROR_EVENT 13000
 #define RSEARCHLIST_CHANGED_EVENT 14000
 #define RGLOBALENV_SYMBOLS_CHANGED_EVENT 14001
-#define RINDIVIDUAL_SYMBOLS_CHANGED_EVENT 14002
 
 /** This class represents the thread the R backend is running in. So to speak, this is where the "eventloop" of R is running. The main thing happening
 in this class, is that an infinite loop is running. Whenever there are commands to be executed, those get evaluated. Also, at regular intervals,

Modified: trunk/rkward/rkward/robjectbrowser.cpp
===================================================================
--- trunk/rkward/rkward/robjectbrowser.cpp	2006-10-17 18:26:28 UTC (rev 880)
+++ trunk/rkward/rkward/robjectbrowser.cpp	2006-10-19 12:34:18 UTC (rev 881)
@@ -86,7 +86,7 @@
 
 void RObjectBrowser::updateButtonClicked () {
 	RK_TRACE (APP);
-	RObjectList::getObjectList ()->updateFromR ();
+	RObjectList::getObjectList ()->updateFromR (0);
 }
 
 void RObjectBrowser::popupHelp () {
@@ -113,7 +113,7 @@
 		if (valid != name) KMessageBox::sorry (this, i18n ("The name you specified was already in use or not valid. Renamed to %1").arg (valid), i18n ("Invalid Name"));
 		RObject *copy = RObjectList::getGlobalEnv ()->createNewChild (valid, 0, true, true);
 		RKGlobals::rInterface ()->issueCommand (RObject::rQuote (valid) + " <- " + object->getFullName (), RCommand::App | RCommand::ObjectListUpdate);
-		copy->updateFromR ();
+		copy->updateFromR (0);
 	}
 }
 
@@ -127,7 +127,7 @@
 	if (valid != name) KMessageBox::sorry (this, i18n ("An object named '%1' already exists in the GlobalEnv. Created the copy as '%2' instead.").arg (name).arg (valid), i18n ("Name already in use"));
 	RObject *copy = RObjectList::getGlobalEnv ()->createNewChild (valid, 0, true, true);
 	RKGlobals::rInterface ()->issueCommand (RObject::rQuote (valid) + " <- " + object->getFullName (), RCommand::App | RCommand::ObjectListUpdate);
-	copy->updateFromR ();
+	copy->updateFromR (0);
 }
 
 void RObjectBrowser::popupView () {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list