Subject: Re: Ajuba is not supporting Macintosh! - DN [1]


John Seal <johnseal@indy.net> - 16 Jul 2000 - comp.lang.tcl

 In article <3971BC8C.85693087@dai.ed.ac.uk>, Mick O'Donnell
 <micko@dai.ed.ac.uk> wrote:

 >   However, the Mac version has always lagged, first in terms
 > of native look and feel, and also the lack of double-clicking
 > to launch a tcl document.

 You CAN have double-click launching of tcl documents. Edit the Tk8.3shlb
 (or whatever version you're using) and in TEXT resource id 3001 "tk" add
 a function like:

 # Procedure to source first script dropped on Wish.

 proc tkOpenDocument {file args} {
     global argv0
     set argv0 $file
     after idle {
         uplevel #0 {
             cd [file dirname $argv0]
             source $argv0
         }
     }
 }

 Then change the type and creator of your tcl documents to TEXT/WIsH and
 they will execute under Wish. The above script also makes Wish execute a
 document dropped on it. You can easily modify the script to execute
 multiple documents dropped at once, if you wish. Bear in mind that if
 your tcl documents used to open in an editor (as mine did) that this
 will make it harder to edit them.

 --
 John Seal

Last modified
2000-07-20

(195.108.246.52)

Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated