From AlphaWiki

Main: Modifying with Smarter Source files

This wiki page outlines how one can change nearly any aspect of the AlphaTcl User Interface by redefining various procedures in preference files.

Alpha includes a feature named "Smarter Source" which allows users to redefine all of the procedures in an entire file in the standard distribution. To obtain more information about how this feature works, select the menu item

Help > More Features Help > Smarter Source

and then read the information in the new window that is created. Topics in this page include


Using the Smarter Source package

To create and modify Smarter Source files, you must

(1) Activate the Smarter Source feature, using the

Config > Global Setup > Features

dialog. Click on the checkbox next to "Smarter Source" and press the "OK" button.

(2) Define a Smarter Source Folder preference, using the

Config > Preferences > Input-Output Prefs > Files

dialog. The default value is your Alpha Prefs folder -- see the WhereIsMyAlphaPreferencesFolder page for more information.

(3) Place a copy of the file of interest in this directory. Make your changes as necessary. Select the

Tcl Menu > Evaluate

menu item to source the code in the new version of the file, or save the file and restart Alpha.


Smarter Source Tips

original file has been changed. If so, you will not be using any procedure in the newer version. You should perform a 'diff' of the new original and your modified source and copy over any changes which are not relevant to your modifications. Open both windows and select the menu command

Utils > Compare > Windows

to do this.

users, please advertise your changes on one of the AlphaTclMailingLists. If your changes are accepted and included in the next release, be sure to remove your Smarter Source file when it is irrelevant.

a Smarter Source file (and then forgotten about this.) It is useful to create a new fileset named "Smarter Source" so that you can quickly review its contents before reporting a bug or some other odd behavior.

files. This is because they are loaded using the source command with a 'hard-wired' file-path. The only option in the case is to modify the original file.


Category.Main

Retrieved from http://alphatcl.sourceforge.net/wiki/pmwiki.php/Main/ModifyingWithSmarterSourceFiles
Page last modified on January 23, 2006, at 11:20 PM