O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Macintosh and ResEdit

If you want to create a self-contained Tcl/Tk application on Macintosh, you must copy the Wish program and add a Macintosh resource named tclshrc that has the start-up Tcl code. The Tcl code can be a single source command that reads your script file. Here are step-by-step instructions to create the resource using ResEdit:

  • First, make a copy of Wish and open the copy in ResEdit.
  • Pull down the Resource menu and select Create New Resource operation to make a new TEXT resource.
  • ResEdit opens a window and you can type in text. Type in a source command that names your script:
    source "Hard Disk:Tcl/Tk 8.1:Applications:MyScript.tcl"
    
  • Set the name of the resource to be tclshrc. You do this through the Get Resource Info dialog under ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required