[Kst] kdeextragear-2/kst/kst/extensions/js

George Staikos staikos at kde.org
Thu Mar 31 06:40:06 CEST 2005


CVS commit by staikos: 

toString for bind_point returns (x, y) now


  A            examples/makedata.js   1.1
  M +9 -4      TODO   1.7
  M +5 -0      bind_point.cpp   1.2
  M +1 -0      bind_point.h   1.2
  M +1 -1      kstbinding.h   1.4


--- kdeextragear-2/kst/kst/extensions/js/TODO  #1.6:1.7
@@ -1,10 +1,15 @@
+Major:
+- clear interpreter
+- link in our own kjsembed if needed (and rename it)
+- more verbose error messages (ie: which argument is wrong, and why)
+- what should we do for toString()?  It's basically empty in all classes
+
+
+Would be nice:
 - save and load state
 - object browser GUI
 - multiple interpreters?
 - dump list of loaded files
-- clear interpreter
 - many bindings lack good [or any] bindings (ComboBox, list{view,box}, etc)
-- link in our own kjsembed if needed (and rename it)
-- string comparisons are to slow - at least use ustring
-- more verbose error messages (ie: which argument is wrong, and why)
+- string comparisons are too slow - at least use ustring
 

--- kdeextragear-2/kst/kst/extensions/js/bind_point.cpp  #1.1:1.2
@@ -204,3 +204,8 @@ KJS::Value KstBindPoint::y(KJS::ExecStat
 }
 
+
+KJS::UString KstBindPoint::toString(KJS::ExecState *exec) const {
+  return KJS::UString(QString("(%1, %2)").arg(_x).arg(_y));
+}
+
 // vim: ts=2 sw=2 et

--- kdeextragear-2/kst/kst/extensions/js/bind_point.h  #1.1:1.2
@@ -40,4 +40,5 @@ class KstBindPoint : public KstBinding {
     KJS::ReferenceList propList(KJS::ExecState *exec, bool recursive = true);
     bool hasProperty(KJS::ExecState *exec, const KJS::Identifier& propertyName) const;
+    KJS::UString toString(KJS::ExecState *exec) const;
 
     // properties

--- kdeextragear-2/kst/kst/extensions/js/kstbinding.h  #1.3:1.4
@@ -32,5 +32,5 @@ class KstBinding : public KJSEmbed::JSPr
 
     QString typeName() const;
-    KJS::UString toString(KJS::ExecState *exec) const;
+    virtual KJS::UString toString(KJS::ExecState *exec) const;
 
     bool implementsConstruct() const;




More information about the Kst mailing list