1 # -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
3 # $Id: EHref.tcl,v 1.3 2004-10-13 12:08:57 vvzhy Exp $
5 ###### EHref.tcl ######
6 ############################################################
7 # Netmath Copyright (C) 1998 William F. Schelter #
8 # For distribution under GNU public License. See COPYING. #
9 ############################################################
13 #-----------------------------------------------------------------
15 # eval_href -- Follow a link to another om document
21 #----------------------------------------------------------------
24 proc obsoleteeval_href
{ program w this nextResult
} {
26 foreach v
[$w tag names
[lindex $this 0]] {
27 if { [string first
"\{ThrefArg" $v] == 0 } {
32 set arglist
[getTargTags
$w $this]
33 if { [llength $arglist] != 1 } {
34 return -code error -errorinfo [concat "[llength $arglist]" [mc
"args to href. Wanted 1, got:"] "$arglist"]
36 puts "arglist=$arglist"
38 set arg
[lindex $arglist 0]
40 set list [lrange $arg 1 end
]
41 set doc
[assoc
-src $list ""]
43 set searchregexp
[assoc
-searchregexp $list ""]
44 set search
[assoc
-search $list ""]
49 puts " OpenMathOpenUrl $doc -commandpanel [omPanel $w]"
50 OpenMathOpenUrl
$doc -commandpanel [omPanel
$w]
52 makeLocal
[omPanel
$w] textwin
54 if { "$searchregexp" != "" } {
55 set ind
[ $textwin search
-regexp -- $searchregexp 1.0]
56 } elseif
{ "$search" != "" } {
57 set ind
[ $textwin search
-exact -- $search 1.0]
67 ## endsource ehref.tcl