[Kst] extragear/graphics/kst/kst/extensions/js

George Staikos staikos at kde.org
Wed Jun 1 15:44:44 CEST 2005


SVN commit 420823 by staikos:

documentation fixes, and make frameCount work


 M  +1 -1      bind_curve.h  
 M  +5 -1      bind_datasource.cpp  
 M  +3 -3      bind_datasource.h  


--- trunk/extragear/graphics/kst/kst/extensions/js/bind_curve.h #420822:420823
@@ -231,7 +231,7 @@
        @description The top label suggestion for this curve.
     */
     KJS::Value topLabel(KJS::ExecState *exec) const;
-    /* @property string xabel
+    /* @property string xLabel
        @readonly
        @description The X-axis label suggestion for this curve.
     */
--- trunk/extragear/graphics/kst/kst/extensions/js/bind_datasource.cpp #420822:420823
@@ -260,13 +260,17 @@
 
   QString field;
 
-  if (args.size() != 1) {
+  if (args.size() == 1) {
     if (args[0].type() != KJS::StringType) {
       KJS::Object eobj = KJS::Error::create(exec, KJS::TypeError);
       exec->setException(eobj);
       return KJS::Undefined();
     }
     field = args[0].toString(exec).qstring();
+  } else if (args.size() != 0) {
+    KJS::Object eobj = KJS::Error::create(exec, KJS::SyntaxError, "Requires at most one argument.");
+    exec->setException(eobj);
+    return KJS::Undefined();
   }
 
   _s->writeLock();
--- trunk/extragear/graphics/kst/kst/extensions/js/bind_datasource.h #420822:420823
@@ -62,9 +62,9 @@
     */
     KJS::Value fieldList(KJS::ExecState *exec, const KJS::List& args);
     /* @method samplesPerFrame
-       @optarg string field An optional field name to get the number of
-                            samples per frame for.  This is the same for every
-                            field in some sources, but different in others.
+       @arg string field An optional field name to get the number of
+                         samples per frame for.  This is the same for every
+                         field in some sources, but different in others.
        @returns number
        @description The number of samples per frame for this field or source.
     */


More information about the Kst mailing list