home *** CD-ROM | disk | FTP | other *** search
-
- DefTool2 (requires Workbench2.0, V37 or greater)
- ~~~~~~~~
- by Robert Lang.
-
- This program is ⌐ Robert Lang, 1992, and remains the property of Robert
- Lang, but may be freely distributed under non-commercial distribution links,
- at no more charge than that of Fred Fish or Megadisc Australia. I take
- no responsibility for damage done through the use of this program. Commercial
- use requires the written permission of the author.
-
- Now that that's all over, what does it do ?
-
- A program I wrote a while back (mid '91), allowed the easy setting of the
- "Default Tool" field of project icons, by executing the command
- 'deftool file tool' from the shell.
-
- Now, I've finally got around to doing what I wanted to do all along, provide
- a workbench version. Using the excellent "AppMenuItem" feature of Workbench 2,
- I've now written DefTool2.
-
- The only thing it does from the shell now is start itself or display an
- "About" message if ? is supplied as an argument.
-
- DefTool2 is designed to run from the Workbench, and is a Workbench 2 Commodity.
- (This means it can be controlled from the Commodity Exchange !).
-
- The best method of starting DefTool2 is to put it into the sys:wbstartup
- directory, and when you boot your machine it will always be there !
-
- DefTool2 adds the menu item "Set Default Tool" to the Tools menu of Workbench 2,
- and this is of course its main feature.
-
- When a series of icons are selected and the "Set Default Tool" menu item
- selected, then the user is prompted for a default tool to be entered,
- and then DefTool2 goes to work, changing the Default Tool of all "Project"
- icons to the text entered.
-
- If any of the icons which are selected are not project icons, then DefTool2
- calls DisplayBeep() for each of these. (hence, by default, the screen flashes).
-
- Note that unfortunately, Workbench2 doesn't seem to pass me icons for
- which there is no actual corresponding file....ie. if 'rob.info' is selected
- and 'rob' is non-existant, Workbench2 doesn't tell DefTool2 anything
- about 'rob.info' and so no processing will occur. If you need this feature,
- use my original shell-version, DefTool.
-
- If a single project is selected, then the current Default Tool of that
- project is copied into the text requester and so you can edit it as if
- you used the "Information" option of Workbench 2.
-
- When editing the Default Tool, clicking return in the text box or hitting
- SAVE set DefTool2 to work, CANCEL or closing the window cancels the operation.
-
- DefTool2 reports serious errors with Recoverable Alerts, and simple errors
- (such as nothing selected !) as screen flashes.
-
- If DefTool2 is already running, no action is taken by running it again.
-
- You can set the Commodity Priority using the CX_PRIORITY argument in the
- tool types of the icon for DefTool2, and in addition you can set the
- DEFTOOL to be the default text entered into the text requester when setting
- Default Tools. (e.g. DEFTOOL=:c/fullview)
-
- (Oh, and the little path requester was easily whipped up using GadToolsBox
- from Jaba Development, available from the Fish Disks.)
-
- If you like DefTool2, perhaps a contribution towards my programming will
- keep me writing utilities in the future !
-
- Send comments, bug reports, money, porsches, '040 cards, 24bit Graphics
- cards, 1 Gigabye harddrives or anything non explosive to :
-
- Robert Lang
- EdgeWare
- P.O. Box 127
- CARDIFF NSW 2285
- AUSTRALIA
-
- Oh, and as always, this is dedicated to my girlfriend, Suzanne !
-
- Enjoy !
-
- Robert Lang, 8th June 1992, V1.20.
-
- ------------------
-
- History :
-
- 31st May 1992 - First Release V1.00
- 3rd June 1992 - Bug fix to V1.10, was failing to set all default tool types
- randomly, couldn't figure out exactly why, but worked
- a way around it...a pointer from a WB2 function was changing
- when I didn't want it to...so I used my own, works fine now.
- (I probably wasn't supposed to use that pointer anyway...)
- 8th June 1992 - Update to V1.20, removed my routine for making a path from a
- lock and switched to the WB2 function "NameFromLock" !
- 14th June 1992 - Fixed a bug introduced in the previous change,
- which meant that files too deep in a directory
- structure didn't work...hopefully this is it !
-