jdc8 / wub

Automatically exported from code.google.com/p/wub
0 stars 0 forks source link

Any direct domain fails in Wub fix attached #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. start wub as in the QuickStart guide
2. in browser surf to any directoo url
3.

What is the expected output? What do you see instead?
Not an errorInfo output. 
ErrorInfo complaining about failure of Utilities/OO.tcl methods failing. 

What version of the product are you using? On what operating system?
running on Linux Fedora 9 using Tcl 8.6b.1 

Please provide any additional information below.
Code in OO.tcl was failing in two places because oo instrospection commands
were illegal/ill-formed. svn diff below of edits I made to make
it work again. 
Index: OO.tcl
===================================================================
--- OO.tcl  (revision 2083)
+++ OO.tcl  (working copy)
@@ -5,7 +5,9 @@
 package provide OO 1.0

 proc ::oo::Helpers::classvar {name args} {
-    set ns [info object namespace [uplevel 1 {self class}]]
+    # added by cjolly because following line failed
+    set ns [uplevel 1 { self namespace}]
+    #set ns [info object namespace [uplevel 1 {self class}]]
     foreach v [list $name {*}$args] {
    uplevel 1 [list namespace upvar $ns $v $v]
     }
@@ -13,7 +15,8 @@

 proc ::oo::define::classmethod {name {args {}} {body {}}} {
     set class [lindex [info level -1] 1]
-    set classmy [info object namespace $class]::my
+    set classmy [uplevel 1 { self namespace}]::my
+    #set classmy [info object namespace $class]::my
     if {[llength [info level 0]] == 4} {
         uplevel 1 [list self method $name $args $body]
     }

Original issue reported on code.google.com by cwjo...@gmail.com on 7 Dec 2009 at 1:20

GoogleCodeExporter commented 9 years ago
I believe the [info object namespace] sub-command was added recently, post 
8.6b1.

The code you have may work for the version of Tcl 8.6 you're using, but in the 
longer
term the original code is what's needed.

Original comment by mcc...@gmail.com on 4 Feb 2010 at 11:31