[rkward-cvs] SF.net SVN: rkward:[2888] trunk/rkward/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Jun 20 19:51:38 UTC 2010
Revision: 2888
http://rkward.svn.sourceforge.net/rkward/?rev=2888&view=rev
Author: tfry
Date: 2010-06-20 19:51:37 +0000 (Sun, 20 Jun 2010)
Log Message:
-----------
Minor enhancement
Modified Paths:
--------------
trunk/rkward/rkward/plugins/testing/test1.xml
trunk/rkward/rkward/scriptbackends/rkcomponentscripting.js
Modified: trunk/rkward/rkward/plugins/testing/test1.xml
===================================================================
--- trunk/rkward/rkward/plugins/testing/test1.xml 2010-06-20 19:38:43 UTC (rev 2887)
+++ trunk/rkward/rkward/plugins/testing/test1.xml 2010-06-20 19:51:37 UTC (rev 2888)
@@ -5,17 +5,20 @@
<logic>
<script><![CDATA[
+ call_num = 0;
gui.setValue ("Select a dependent variable!", "text.text");
f = Kross.module('forms');
label = f.createWidget(scripty, 'QLabel', 'Label', {});
label.setText ('<b>This label was created by the script. Be sure to read the label above, too.</b>');
- _rkward.addChangeCommand ("x.available", "updateText ()");
+ gui.addChangeCommand ("x.available", "updateText ()");
updateText = function () {
+ call_num += 1;
obj = makeRObject (gui.getValue ("x.available"));
text = "So, you think it's '" + obj.objectname + "'?\n";
- text += "That has length " + obj.dimensions() + " and classes " + obj.classes() + "!";
+ text += "That has length " + obj.dimensions() + " and classes " + obj.classes() + "!\n";
+ text += "Updates of this text so far: " + call_num;
gui.setValue (text, "text.text");
}
]]></script>
Modified: trunk/rkward/rkward/scriptbackends/rkcomponentscripting.js
===================================================================
--- trunk/rkward/rkward/scriptbackends/rkcomponentscripting.js 2010-06-20 19:38:43 UTC (rev 2887)
+++ trunk/rkward/rkward/scriptbackends/rkcomponentscripting.js 2010-06-20 19:51:37 UTC (rev 2888)
@@ -38,6 +38,10 @@
this.getChild = function (id) {
return (new Component (this.absoluteId (id)));
}
+
+ this.addChangeCommand = function (id, command) {
+ _rkward.addChangeCommand (this.absoluteId (id), command);
+ }
}
makeComponent = function (id) {
return (new Component (id));
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