You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by mx...@apache.org on 2011/03/31 00:43:51 UTC

svn commit: r1087121 - in /tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl: debug.tcl import_switch_args.tcl load_response.tcl

Author: mxmanghi
Date: Wed Mar 30 22:43:50 2011
New Revision: 1087121

URL: http://svn.apache.org/viewvc?rev=1087121&view=rev
Log:
Some Tcl script refer to other Rivet commands, which now have to be prefixed by the namespace '::rivet'

Modified:
    tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/debug.tcl
    tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/import_switch_args.tcl
    tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/load_response.tcl

Modified: tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/debug.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/debug.tcl?rev=1087121&r1=1087120&r2=1087121&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/debug.tcl (original)
+++ tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/debug.tcl Wed Mar 30 22:43:50 2011
@@ -64,7 +64,7 @@ namespace eval ::rivet {
         }
 
         if {[string tolower $data(subst)] != "on"} {
-            html [join $data(args)]
+            ::rivet::html [join $data(args)]
             return
         }
 
@@ -76,15 +76,15 @@ namespace eval ::rivet {
                 set lastWasArray 1
             } elseif {[info exists var]} {
                 if {!$lastWasArray} {
-                    html $data(separator)
+                    ::rivet::html $data(separator)
                 }
-                html $var
+                ::rivet::html $var
                 set lastWasArray 0
             } else {
                 if {!$lastWasArray} {
-                    html $data(separator)
+                    ::rivet::html $data(separator)
                 }
-                html $varName
+                ::rivet::html $varName
                 set lastWasArray 0
             }
         }

Modified: tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/import_switch_args.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/import_switch_args.tcl?rev=1087121&r1=1087120&r2=1087121&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/import_switch_args.tcl (original)
+++ tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/import_switch_args.tcl Wed Mar 30 22:43:50 2011
@@ -9,7 +9,7 @@
 ##
 ###
 
-namespace ::rivet {
+namespace eval ::rivet {
 
     proc import_switch_args {arrayName argsList {switchList ""}} {
         upvar 1 $arrayName array
@@ -23,21 +23,20 @@ namespace ::rivet {
         }
 
         foreach arg $argsList {
-            if {[string index $args 0] != "-"} {
-                    set array(args) [lrange $argsList $index end]
-                    break
-                } elseif {$arg == "--"} {
+            if {[string index $arg 0] != "-"} {
+                set array(args) [lrange $argsList $index end]
+                break
+            } elseif {$arg == "--"} {
                 set array(args) [lrange $argsList [expr $index + 1] end]
                 break
             }
 
             set switch [string range $arg 1 end]
             if {!$proofSwitches || [lsearch -exact $switchList $switch] >= 0} {
-                    set array($switch) $index
+                set array($switch) $index
                 lappend array(switches) $switch
             }
             incr index
         }
     }
-
 }

Modified: tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/load_response.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/load_response.tcl?rev=1087121&r1=1087120&r2=1087121&view=diff
==============================================================================
--- tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/load_response.tcl (original)
+++ tcl/rivet/branches/rivet-namespace/rivet/rivet-tcl/load_response.tcl Wed Mar 30 22:43:50 2011
@@ -14,7 +14,7 @@ namespace eval ::rivet {
     proc load_response {{arrayName response}} {
         upvar 1 $arrayName response
 
-        foreach {var elem} [var all] {
+        foreach {var elem} [::rivet::var all] {
             if {[info exists response(__$var)]} {
                 # we have seen var multiple times already, add to the list
                 lappend response($var) $elem



---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org