[rkward-cvs] SF.net SVN: rkward: [840] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Oct 11 10:15:28 UTC 2006
Revision: 840
http://svn.sourceforge.net/rkward/?rev=840&view=rev
Author: tfry
Date: 2006-10-11 03:15:22 -0700 (Wed, 11 Oct 2006)
Log Message:
-----------
Make sure to watch newly created symbols in the global env
Modified Paths:
--------------
trunk/rkward/TODO
trunk/rkward/rkward/core/renvironmentobject.cpp
trunk/rkward/rkward/core/renvironmentobject.h
Modified: trunk/rkward/TODO
===================================================================
--- trunk/rkward/TODO 2006-10-09 15:44:54 UTC (rev 839)
+++ trunk/rkward/TODO 2006-10-11 10:15:22 UTC (rev 840)
@@ -68,6 +68,12 @@
- use RKGlobals::marginHint (), RKGlobals::spacingHint () everywhere
Internal stuff:
+ RKVariable:
+ - the storage mechanism for invalid values (and the type detection) is flawed. The following should be done instead:
+ - R storage type is always == RKWard data type.
+ - Invalid values are stored in a list in an attribute of the variable in question
+ - The corresponding "real" fields are set to NA
+ - Need to add a conversion script. See .rk.get.meta (). Both should be changed at the same time.
- maybe we can do stuff like auto-printing, (toplevel handlers: no, not those, they are not called in R_ReplDLLdo1 ()), syntax error information by using R_ReplDLLdo1 () for user/console commands. The command-text would be fed in via R_ReadConsole (would need to keep a buffer).
- How to differentiate readline calls to get new command data from readline calls to get user info?! The prompt may not be realiable enough. Is there other info?
- the hist parameter may be a hint, but is also set in do_browser
Modified: trunk/rkward/rkward/core/renvironmentobject.cpp
===================================================================
--- trunk/rkward/rkward/core/renvironmentobject.cpp 2006-10-09 15:44:54 UTC (rev 839)
+++ trunk/rkward/rkward/core/renvironmentobject.cpp 2006-10-11 10:15:22 UTC (rev 840)
@@ -63,6 +63,19 @@
return (name + "$" + short_child_name);
}
+RObject *REnvironmentObject::createNewChild (const QString &name, RKEditor *creator, bool container, bool data_frame) {
+ RK_TRACE (OBJECTS);
+
+ RObject *obj = RContainerObject::createNewChild (name, creator, container, data_frame);
+
+ if (type & GlobalEnv) {
+ RKGlobals::rInterface ()->issueCommand (".rk.watch.symbol (" + rQuote (name) + ")", RCommand::App | RCommand::Sync, QString::null, 0);
+ }
+
+ return obj;
+}
+
+
void REnvironmentObject::writeMetaData (RCommandChain *chain) {
RK_TRACE (OBJECTS);
Modified: trunk/rkward/rkward/core/renvironmentobject.h
===================================================================
--- trunk/rkward/rkward/core/renvironmentobject.h 2006-10-09 15:44:54 UTC (rev 839)
+++ trunk/rkward/rkward/core/renvironmentobject.h 2006-10-11 10:15:22 UTC (rev 840)
@@ -38,6 +38,8 @@
QString makeChildName (const QString &short_child_name, bool misplaced=false);
/** reimplemented from RContainerObject: If this is an environment var, call RContainerObject::writeMetaData (). Else, do nothing. An environment has no meta data. */
void writeMetaData (RCommandChain *chain);
+/** reimplemented from RContainerObject: If this is the global env, add a watch for the new child */
+ RObject *createNewChild (const QString &name, RKEditor *creator=0, bool container=false, bool data_frame=false);
protected:
bool updateStructure (RData *new_data);
/** reimplemented from RContainerObject to raise an assert if this is not the isGlobalEnv (). Otherwise calls "remove (objectname)" instead of objectname <- NULL" */
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