Recent Changes - Search:

WikiDoc

Categories

HOME

FAQ.HOME History

Hide minor edits - Show changes to markup

January 23, 2006, at 03:18 PM by 212.180.15.164 -
Changed line 51 from:
    «» set HOME
to:
Changed line 58 from:
    «» file::showInFinder $HOME
to:
Changed lines 87-88 from:
    «» cd $HOME
    «Alpha»
to:
     cd $HOME
    Alpha
Changed line 94 from:
    «Alpha» ls
to:
    Alpha ls
Changed line 102 from:
    «Alpha» join [ls] \r
to:
    Alpha join [ls] \r
Changed line 117 from:
    «Alpha»
to:
    Alpha
Changed line 123 from:
    «Alpha» set ALPHA
to:
    Alpha set ALPHA
Changed line 126 from:
    «Alphatk» set ALPHA
to:
    Alphatk set ALPHA
January 23, 2006, at 03:08 PM by 212.180.15.164 -
Added lines 1-134:

(:title The $HOME variable)

In many of these wiki pages, path names are given relative to the $HOME variable. What does this mean? $HOME is just a folder on your local disk. A file path like

 
    $HOME/Tcl/Completions/TeXcmds.tcl

is simply a convenient way to describe a path name that is relative to the Alpha/Alphatk binary.

Topics in this page include:

  • Alpha8 and AlphaX $HOME Folders
  • Alphatk $HOME Folders
  • Locating the $HOME Folder
  • $HOME Contents


Alpha8 and AlphaX $HOME Folders

The $HOME folder is the one containing the Alpha program (also referred to as the binary application) as in

  • /Applications/Alpha/

(Your location will be different if you installed Alpha somewhere else on your disk.)


Alphatk $HOME Folders

In MacOSX, Alphatk is distributed as a bundled 'package' -- under normal circumstances, the Finder simply displays the name of the application. If you "Show Package Contents" (using any of the standard OS methods such as the Contextual Menu) you will find the contents of the AlphaTcl library buried in the hierarchy. In this case $HOME refers to one of these folders, as in

  • /Applications/Alphatk.app/Contents/Resources/Scripts/Alpha/

(Your location will be different if you installed Alphatk somewhere else on your disk.)

In all other platforms, $HOME refers to folder containing the Alphatk program.


Locating the $HOME Folder

Developers often include the string $HOME in their directions because there is an actual global variable named HOME that is used in various AlphaTcl procedures.

You can open an AlphaTcl Shell window (using Utils > Tcl Shell) and issue this command

 
    «» set HOME
    /Applications/Alpha

to identify the correct path. You can use this command:

 
    «» file::showInFinder $HOME

to locate $HOME on your local disk.


$HOME Contents

The $HOME folder contains all of the AlphaTcl files, plus the Help and Examples folders and anything else that is included in the standard distribution. Its contents might include

  • AlphaPrefs
  • AlphaTcl Homepage.webloc
  • AlphaX 8.0b17d3.app
  • AppleScripts
  • Cache
  • CVS
  • Developer
  • Examples
  • Help
  • Release Notes.txt
  • Tcl
  • Tclextensions
  • Tools
  • Update AlphaTcl

Tip: you can open an AlphaTcl Shell window (using Utils > Tcl Shell) and issue this command

 
    «» cd $HOME
    «Alpha»

to change the current directory used by the shell. Some unix-style commands are then available, such as

 
    «Alpha» ls
    AlphaPrefs {AlphaTcl Homepage.webloc} {AlphaX 8.0b17d3.app} AppleScripts Cache CVS Developer Examples Help {Icon
    } {Release Notes.txt} Tcl Tclextensions Tools {Update AlphaTcl}

Combined with the Tcl join command, you can get this:

 
    «Alpha» join [ls] \r
    AlphaPrefs
    AlphaTcl Homepage.webloc
    AlphaX 8.0b17d3.app
    AppleScripts
    Cache
    CVS
    Developer
    Examples
    Help
    Release Notes.txt
    Tcl
    Tclextensions
    Tools
    Update AlphaTcl
    «Alpha»

Advanced Topic: Also note that there is a related $ALPHA variable which refers to the current process.

 
    «Alpha» set ALPHA
    AlphaX_D

    «Alphatk» set ALPHA
    /Applications/Text Applications/Alphatk.app/Contents/MacOS/Alphatk

This variable is generally used for application interactions, when you need to identify the process that started some action or the one that should receive a result.


Category.FAQ

Page last modified on January 23, 2006, at 03:18 PM
Hosted on SourceForge.net Logo