TweetFollow Us on Twitter

Third-Party Editors
Volume Number:10
Issue Number:6
Column Tag:Tools of the Trade

Using Third-Party Editors
With Symantec C++

Going beyond the basics

By Jeffrey Mattson

Introduction

THINK C’s integrated editor has long been a mixed blessing. While it’s useful to have everything you need to start programming in one package, experienced users soon long for more sophisticated features, such as macros and file comparisons. However, THINK C couldn’t communicate with other editors as it could with its own integrated editor, and that made matters difficult. For example, when you edited a file with another editor, THINK C wouldn’t know that you changed the file and that it needed to be recompiled. You’d have to explicitly mark the file for compilation. The hassles of using a third-party editor soon outweighed the convenience of any new features.

With the advent of System 7 and the latest version of THINK C and Symantec C++, you now have a choice [and you can get an editor which knows how to search forwards and backwards - ed stb]. The THINK Project Manager in THINK C and Symantec C++ can communicate with other editors with a suite of Apple Events. However, editors have to be designed to use these Apple Events. Two such editors are BBEdit from Bare Bones Software and QUED/M from Nisus.

Getting Started

Setting up an editor to use with the THINK Project Manager is fairly easy. In the Finder, create an alias of the editor with the Make Alias command, rename the alias to “Editor”, and move it to the Tools folder in the THINK C or Symantec C++ folder. In the THINK Project Manager, open your project, and turn on the “Use external editor” option in the Editor page of the THINK Project Manager options dialog.

If an operation would normally open a file in a THINK Editor window, it now opens a window in your editor. When you double-click on a file in the project window, an error in the Compiler Errors window, or an entry in the Search Results window, the THINK Project Manager now uses your editor of choice. The editor even scrolls to the line that contains the error (or search string) and selects it.

What Works Well

The editors implement most of the features that the THINK Project Manager allows and they implement these features in eerily similar ways, right down to the titles on their menu bars. Both editors have a special THINK Project Manager menu and they use as their title the THINK Project Manager icon. The menus contain similar commands to handle the most common tasks: running your project, adding the front most window to your project, compiling a file, and building the application. QUED/M even gives the commands the same command key equivalents as the THINK Project Manager, and it has some additional commands that the THINK Project Manager lacks, such as one that runs your project without the debugger, regardless of the setting of the Use Debugger option.

BBEdit in use

QUED/M in use

An unexpected extra is that both editors let you open header files just as you do in the THINK Project Manger. When you command-click on a source file’s title bar, the editor displays a menu of header files. However, be sure to hold that mouse button down for a while. There can be a noticeable delay as the editor goes off to get the information from THINK Project Manager.

Both editors are integrated with THINK Reference. They let you look up the selected text in THINK Reference and they can even insert the declaration of the selected function name. BBEdit will launch THINK Reference for you if it’s not already running. By the way, don’t let the name of BBEdit’s command confuse you. Although it’s called Toolbox Lookup , it can also look up the names of standard C library functions in the databases included with THINK C and Symantec C++.

What Doesn’t Work

Unfortunately, you do lose some of the convenient features in the THINK editor when you use a third-party editor. One loss that’s deeply missed is the Option-double-click shortcut. When you Option-double-click on a function or variable name in the THINK editor, the editor finds the function or variable definition and opens the file that contains it. Neither editor contains this feature.

[This is a result of the Think Project Manager not providing a mechanism for an external editor to search for the definition of a global name - Ed stb].

Most importantly, you must remember to save your files frequently. If you’ve used the THINK editor before, you’ve probably grown accustomed to the option that saves your files automatically before the THINK Project Manager runs your project. However, when you use another editor, the THINK Project Manager doesn’t tell that editor to save your files before it runs your program. If your machine crashes while your program is running, you’ll be unpleasantly surprised to find that all your changes are lost. And if you manage to finish an editing session (after your application has crashed), you may still get an unpleasant delay on the next build, because the THINK Project Manager doesn’t know that the newly-saved files contain code that it’s already compiled. The next time you open the project and compile it, the THINK Project Manager marks all those files and recompiles them. This wait can be a real hassle if you changed a lot of files before. The only solution to both these problems is to save the files yourself before compiling them.

Correcting errors can be a nuisance with THINK. When you double-click on an error in the THINK Project Manager’s Compiler Errors window, the editor opens the file and selects the line, and then repeats the error in a dialog box. If you’ve just double-clicked on the error, you don’t need to see it again. Both editors let you go to the next or previous error, without going back to THINK Project Manager.

BBEdit also has a Compile Errors browser. The top of the window contains a list of all the errors, the bottom displays source for the selected error. When you click on an error, the bottom of the window displays the file and highlights the line that contains the error. However, you cannot correct the error in the browser, but you can double-click on the error, and BBEdit opens the file and selects the faulty line

For some reason, BBEdit doesn’t always create a Compile Errors browser when there are compilation errors. There is some sort of mis-communication between BBEdit and the THINK Project Manager.

[Because you’re working with two programs (BBEdit and THINKProject Manager), things can get a bit tricky when it comes to error reporting. BBEdit doesn’t get told about errors if the THINK Project Manager is “in charge of” the compiling. For example, if you choose “Bring Up To Date” while you’re in the THINK Project Manager, it will do the job and not report errors to BBEdit. It’s arguable that it should report the errors to BBEdit since you’ve told it you’re using an external editor, but it’s also arguable that it shouldn’t since you issued the command from inside THINK Project Manager. There’s another case where the limitation clearly comes from the THINK Project Manager, and that’s when you choose “Run” from the external editor. THINK Project Manager poses the dialog asking the user whether to bring the project up to date. If the user clicks “Update”, the THINK Project Manager initiates the build, and keeps error information to itself. This is something under discussion between Symantec and external editor folks. One workaround is to always use the external editor’s “Bring Up To Date” command before running. - Ed stb]

Neither editor works particularly well with the THINK Project Manager’s regular multi-file search, in which the THINK Project Manager searches the files in your project for a string, and displays each occurrence of that string as it finds it. BBEdit doesn’t include any support for this but provides its own approach. QUED/M tries to support it, but I could never get it to work correctly. (Whenever I choose QUED/M’s “Go to Next Error/Match” command, it never finds the next occurrence in the file. ) However, both editors work well with a batch multi-file search, in which the THINK Project Manager lists all the occurrences of your string in a Search Result window, and you look at an occurrence by double-clicking an entry.

Additional Features

Both editors offer many features missing in the THINK Project Manager editor. They both save window positions, a frequent request for the THINK editor. When you reopen a file, these editors remember where you last placed its window, and the editors place the window there.

They both perform parenthesis matching, letting you know which open parenthesis matches the closing parenthesis you just typed. BBEdit’s parenthesis matching is easier to understand, but QUED/M’s is more powerful. QUED/M beeps when you type a closing parenthesis that has no opening parenthesis, for example, while BBEdit does nothing. QUED/M also lets you edit the list of characters and strings that it considers to be parentheses. For example, if you’re editing Pascal code, you could have the editor treat the words BEGIN and END as parentheses.

Both editors let you add external commands. In BBEdit, you need to create a special kind of code resource with a C or Pascal compiler. QUED/M has its own macro language, and it lets you record a macro as you work or type one up separately. Neither supports AppleScript yet.

QUED/M Macro language

Finally, they perform file comparisons. When you have two versions of the same file, a file comparison command can point out where the text has changed. BBEdit’s file comparison feature is easier to use, since you set all its options from one dialog. QUED/M’s is more powerful but also more confusing. You need to select a couple of different commands to perform a comparison, but QUED/M gives you more customization options and even lets you compare up to three files at once.

Special Features in BBEdit

BBEdit contains several especially useful features that aren’t available in QUED/M. For example, you can open a THINK Project Manager or THINK Pascal project in BBEdit, which displays it in a special type of window called a Project Browser. The top of the window contains a list of all the project’s source files and libraries. If you select a file, the bottom pane of the window displays its contents. If you select a library, the bottom pane of the window displays a list of the files the library contains. It would be nice to edit files in the browser, but it’s a browser. To edit a file, double-click on it and BBEdit brings it up in an editing window. You can click on the icon next to the “Open” button, and BBEdit will launch the application that created the project (either THINK C/Symantec C++, THINKPascal, or CodeWarrior), and open the project.

BBEdit also has a Disk Browser. The top of the window contains a list of all the files and folders that you navigate like a Macintosh open file dialog. When you click on a text file, BBEdit displays its contents, but doesn’t let you edit it. When you click on a THINK Project Manager or THINK Pascal project, the browser displays a list of the files and libraries it contains. BBEdit supports Claris XTND translators, so you can also view many other types of files besides ‘TEXT’ in this browser, such as MacWrite or Microsoft Word files. If you open a file that doesn’t have an XTND filter, BBEdit displays its data fork as text. This can occasionally be useful for things like editing AppleLink or ARA CCLfiles, or rummaging for interesting strings.

BBEdit Disk Browser

BBEdit chose to go a different route than THINKProject Manager’s multi-file search, and has its own powerful multi-file search command. It can search through all the files in a THINK Project Manager project, all the windows open in BBEdit, or all the files in a folder. It has a Search Results browser window, and it can remember your favorite search directories. It even lets you search in an On Location index. When you search in a THINK Project Manager project, it doesn’t let you choose which files in the project to search, but it keeps the user interface simpler, lets you use wildcard matching to filter out files by name, and searching is faster than in the THINK Project Manager.

BBEdit also supports Eric Slosser’s PopupFuncs utility which provides a popup list of functions in a source file (it works with THINK and MPW, too).

BBEdit has a backup capability, either automatic or manual. The automatic flavor copies the previously-saved version to a directory you specify (even on a network volume) and adds a date stamp and sequence number.

Special Features in QUED/M

QUED/M also has backup capabilities, and can store the previously saved version of a file as a backup. It can also automatically save all the open files after a certain number of keystrokes. That simple option can save you unwanted frustration when you’re developing an application that can crash at any moment.

QUED/M also has some powerful editing capabilities. It lets you undo a virtually unlimited number of edits: up to 32,767. When you need to return a file to how it was back when your program still worked, this feature comes in very handy. QUED/M also has ten separate clipboards. You can cut some code you might need later into one clipboard, then switch clipboards to keep cutting and pasting without disturbing it. QUED/M even lets you edit the contents of the active clipboard. These features can be indispensable in a crisis.

To help you move through your files easier, QUED/M lets you fold text: it lets you hide text in the window while still saving it in the file. For example, you could leave all the function declarations visible and hide the function bodies. When you’re looking for a function you can scroll through the file quicker, find the function easier, and unfold the function body to edit it. The macro language in QUED/M might help you automate this task, but I haven’t tried it.

The biggest drawback to QUED/M is its confusing interface. The menus are poorly organized, making it difficult to find commands. For example, the title of one menu is a number that constantly changes. It turns out that the number represents the amount of memory that QUED/M is currently consuming. So you might figure that the commands in this menu control memory management. In fact, only one command does. The rest balance parentheses and compare files.

In general, QUED/M tends to be more powerful than BBEdit, but also more confusing. For example, take comparing files. In BBEdit, it takes one command. You choose the Compare Files command, select the files to compare, and click Compare. In QUED/M, it takes several steps. First, you have to choose the Differences Options command to set your options, some of which aren’t available in BBEdit, including what differences to ignore and how to display the comparison. Then you must make sure sure that the two files you want to compare are open in QUED/M and are in the two front most windows. (That’s how QUED/M knows which files to compare.) Finally, you choose 2-File Differences to perform the comparison. And of course all these commands are in the menu conveniently titled 240K (now it’s titled 239K, now it’s 242K, now it’s 238K, now - oh, never mind). In all fairness, though, the comparison facilities in QUED/M are quite flexible, and can handle complex comparisons and automated merging. This power/complexity might be for you if you are team programming, and spend much time merging the work of two people into one source base.

Summing Up

The ability to choose a third-party editor certainly is a boon to the most particular of the power users, but many people will still prefer the THINK editor until Symantec adds some more support for third-party editors. In particular, the THINK Project Manager needs to ask editors to save files before compiling and it needs to let editors display the definition of a symbol on which you Option-double-click.

When choosing a third-party editor, most people will find that BBEdit offers everything they need and is easy to use. However, if you need features like unlimited undo, text folding, sophisticated differencing/merging, and macros that don’t require a compiler, learning to use QUED/M could be best for you.

Availability

BBEdit 2.5 is available from Bare Bones Software for $99. THINK C, THINK Pascal, and Symantec C++ users can get it at the discounted price of $49. It requires System 6.0.7 or later and 350K RAM. (To use BBEdit as an external editor for the THINK Project Manager, you need System 7.)

QUED/M 2.6 is available from most software distributors for a list price of $149. Until June 30th, 1994, it’s available directly from Nisus for $69.95. It requires System 6 or later and 285K RAM. (To use QUED/M as an external editor for the THINK Project Manager, you need System 7.)

for more information

BBEdit - Bare Bones Software, 1 Larkspur Way #4; Natick, MA 01760. Internet bbedit@world.std.com; Compuserve 73051,3255; AppleLink BARE.BONES.

QUED/M - Nisus Software, 107 S. Cedros Ave., Solana Beach, CA 92075-1900. (619) 481-1477. For the special price of $69.95, call (800) 922-2993x761 or e-mail nisus.mktg@applelink.apple.com.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Fresh From the Land Down Under – The Tou...
After a two week hiatus, we are back with another episode of The TouchArcade Show. Eli is fresh off his trip to Australia, which according to him is very similar to America but more upside down. Also kangaroos all over. Other topics this week... | Read more »
TouchArcade Game of the Week: ‘Dungeon T...
I’m a little conflicted on this week’s pick. Pretty much everyone knows the legend of Dungeon Raid, the match-3 RPG hybrid that took the world by storm way back in 2011. Everyone at the time was obsessed with it, but for whatever reason the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for July 19th, 2024. In today’s article, we finish up the week with the unusual appearance of a review. I’ve spent my time with Hot Lap Racing, and I’m ready to give my verdict. After... | Read more »
Draknek Interview: Alan Hazelden on Thin...
Ever since I played my first release from Draknek & Friends years ago, I knew I wanted to sit down with Alan Hazelden and chat about the team, puzzle games, and much more. | Read more »
The Latest ‘Marvel Snap’ OTA Update Buff...
I don’t know about all of you, my fellow Marvel Snap (Free) players, but these days when I see a balance update I find myself clenching my… teeth and bracing for the impact to my decks. They’ve been pretty spicy of late, after all. How will the... | Read more »
‘Honkai Star Rail’ Version 2.4 “Finest D...
HoYoverse just announced the Honkai Star Rail (Free) version 2.4 “Finest Duel Under the Pristine Blue" update alongside a surprising collaboration. Honkai Star Rail 2.4 follows the 2.3 “Farewell, Penacony" update. Read about that here. | Read more »
‘Vampire Survivors+’ on Apple Arcade Wil...
Earlier this month, Apple revealed that poncle’s excellent Vampire Survivors+ () would be heading to Apple Arcade as a new App Store Great. I reached out to poncle to check in on the DLC for Vampire Survivors+ because only the first two DLCs were... | Read more »
Homerun Clash 2: Legends Derby opens for...
Since launching in 2018, Homerun Clash has performed admirably for HAEGIN, racking up 12 million players all eager to prove they could be the next baseball champions. Well, the title will soon be up for grabs again, as Homerun Clash 2: Legends... | Read more »
‘Neverness to Everness’ Is a Free To Pla...
Perfect World Games and Hotta Studio (Tower of Fantasy) announced a new free to play open world RPG in the form of Neverness to Everness a few days ago (via Gematsu). Neverness to Everness has an urban setting, and the two reveal trailers for it... | Read more »
Meditative Puzzler ‘Ouros’ Coming to iOS...
Ouros is a mediative puzzle game from developer Michael Kamm that launched on PC just a couple of months back, and today it has been revealed that the title is now heading to iOS and Android devices next month. Which is good news I say because this... | Read more »

Price Scanner via MacPrices.net

Amazon is still selling 16-inch MacBook Pros...
Prime Day in July is over, but Amazon is still selling 16-inch Apple MacBook Pros for $500-$600 off MSRP. Shipping is free. These are the lowest prices available this weekend for new 16″ Apple... Read more
Walmart continues to sell clearance 13-inch M...
Walmart continues to offer clearance, but new, Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBooks... Read more
Apple is offering steep discounts, up to $600...
Apple has standard-configuration 16″ M3 Max MacBook Pros available, Certified Refurbished, starting at $2969 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free,... Read more
Save up to $480 with these 14-inch M3 Pro/M3...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
Amazon has clearance 9th-generation WiFi iPad...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Apple is offering a $50 discount on 2nd-gener...
Apple has Certified Refurbished White and Midnight HomePods available for $249, Certified Refurbished. That’s $50 off MSRP and the lowest price currently available for a full-size Apple HomePod today... Read more
The latest MacBook Pro sale at Amazon: 16-inc...
Amazon is offering instant discounts on 16″ M3 Pro and 16″ M3 Max MacBook Pros ranging up to $400 off MSRP as part of their early July 4th sale. Shipping is free. These are the lowest prices... Read more
14-inch M3 Pro MacBook Pros with 36GB of RAM...
B&H Photo has 14″ M3 Pro MacBook Pros with 36GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 Pro MacBook Pro (... Read more
14-inch M3 MacBook Pros with 16GB of RAM on s...
B&H Photo has 14″ M3 MacBook Pros with 16GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $150-$200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 MacBook Pro (... Read more
Amazon is offering $170-$200 discounts on new...
Amazon is offering a $170-$200 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1129 for models with 8GB of RAM and 256GB of storage: – 15″ M3... Read more

Jobs Board

*Apple* Systems Engineer - Chenega Corporati...
…LLC,** a **Chenega Professional Services** ' company, is looking for a ** Apple Systems Engineer** to support the Information Technology Operations and Maintenance Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
*Apple* / Mac Administrator - JAMF Pro - Ame...
Amentum is seeking an ** Apple / Mac Administrator - JAMF Pro** to provide support with the Apple Ecosystem to include hardware and software to join our team and Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.