From: <tj...@us...> - 2008-05-31 18:15:40
|
Revision: 10067 http://amsn.svn.sourceforge.net/amsn/?rev=10067&view=rev Author: tjikkun Date: 2008-05-31 11:15:44 -0700 (Sat, 31 May 2008) Log Message: ----------- maybe find a better way to detect if something is a snit object or not, I couldn't find one, although i don't like the catch Modified Paths: -------------- trunk/amsn/protocol.tcl Modified: trunk/amsn/protocol.tcl =================================================================== --- trunk/amsn/protocol.tcl 2008-05-31 15:29:52 UTC (rev 10066) +++ trunk/amsn/protocol.tcl 2008-05-31 18:15:44 UTC (rev 10067) @@ -3898,10 +3898,15 @@ set handler_args [lrange $cmd 1 end] set handler_numargs [llength $handler_args] set handler_realargs [list] - if { $handler != "ns" } { - set handler_realargs [info args $handler] + #snit with tcl 8.5 throws an error + if {[catch {set handler_realargs [info args $handler]}]} { + set method [lindex $cmd 1] + set handler_args [lrange $cmd 2 end] + set handler_numargs [llength $handler_args] + set handler_realargs [$handler info args $method] + status_log "Detected snit object $handler. Method was $method" blue } - + #snit with tcl 8.4 gives us "method args" if {$handler_realargs == "method args" } { set method [lindex $cmd 1] set handler_args [lrange $cmd 2 end] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |