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

George Staikos staikos at kde.org
Mon May 23 23:15:37 CEST 2005


SVN commit 417534 by staikos:

Added docs for Vector to show cross-linking, fixed hardcoded class
name in the stylesheet, and caught a missing safety check in bind_vector


 M  +1 -1      bind_vector.cpp  
 A             bind_vector.xml  
 M  +3 -2      jsdocs.xsl  


--- trunk/extragear/graphics/kst/kst/extensions/js/bind_vector.cpp #417533:417534
@@ -339,7 +339,7 @@
 
 KJS::Value KstBindVector::zero(KJS::ExecState *exec, const KJS::List& args) {
   Q_UNUSED(args)
-  if (!_v) {
+  if (!_v || !_v->editable()) {
     KJS::Object eobj = KJS::Error::create(exec, KJS::GeneralError);
     exec->setException(eobj);
     return KJS::Undefined();
--- trunk/extragear/graphics/kst/kst/extensions/js/jsdocs.xsl #417533:417534
@@ -4,6 +4,7 @@
   <xsl:key name="methodlink" match="method" use="@name"/>
 
   <xsl:template match="//class">
+    <xsl:variable name="thisClass" select="@name"/>
     <html>
     <head>
     <title><xsl:value-of select="@name"/> - KstScript Documentation</title>
@@ -17,7 +18,7 @@
       <h3>Constructors:</h3>
       <ul>
       <xsl:for-each select="constructor">
-        <a href="#constructor_{string(position())}">Curve</a>
+        <a href="#constructor_{string(position())}"><xsl:value-of select="$thisClass"/></a>
         <xsl:text>( </xsl:text>
         <xsl:call-template name="displayArgumentsInline">
           <xsl:with-param name="typed" select="0"/>
@@ -58,7 +59,7 @@
     <!-- Display details of constructors -->
     <xsl:for-each select="constructor">
       <a name="constructor_{string(position())}"/>
-      <b><xsl:text>Curve( </xsl:text>
+      <b><xsl:value-of select="$thisClass"/><xsl:text>( </xsl:text>
       <xsl:call-template name="displayArgumentsInline"/>
       <xsl:text> )</xsl:text>
       </b>


More information about the Kst mailing list