frondoc picture

What is Frontier?
Download
News & Updates

Web Tutorial
Scripting Tutorial
BBEdit Scripting
Directory

Mailing Lists
Sample Scripts
Verb Set
Frontier Site Outline

Search
Guestbook
BBS

User's Guide
1 2 3 4 5 6
7 8 9 10 11

Apple File Edit
Main Open Suites
Web Window

Menubar Outline
Script Table WP

frondoc picture

Editing AppleScripts using Script Debugger

A powerful new connection! -- Now you can use Script Debugger 1.0.4 to edit AppleScript cells in Frontier's object database.

Now you can have the power of Frontier's runtime system and still use your favorite AppleScript editor and debugger. The benefits of running AppleScripts in the Frontier environment are well-explained on the Working with AppleScript page of this website.

Advantages

Even though Frontier's built-in script editor offers the advantage of outline-oriented script editing for AppleScripts, we can't offer debugging features for AppleScripts, and we don't have any way of browsing AppleScript terminology resources.

Fortunately there are several AppleScript editors that solve these problems well, and even better, they support an Apple Event interface that allows them to edit scripts that live in other environments.

With Mark Alldritt's help, we've put together a simple suite that adds a command to Frontier's menu bar that allows you to, with a single keystroke, edit AppleScripts that live in the Frontier environment using Script Debugger 1.0.4.

The suite is built into Frontier 4.1.

How to Use

There's a new command in the UserLand menu, Edit Object Text, single keystroke cmd-E.

Open a table containing an AppleScript object, put the cursor on the object and press cmd-E. (Hint: samples.applescript contains several AppleScripts.)

A dialog appears asking you to locate a compatible editor. For now, that must be Script Debugger 1.0.4 or greater. Choose the app, click on OK. The editor launches and opens the text of the object you chose to edit. The next time you run the command you will not be asked to locate the editor.

Now, you're in your editor. Make some changes. Cmd-S to save. Switch back into Frontier and check it out. The object you chose to edit has changed!

Is that cool? Yeah!! Very.

Funny characters

Calls to Frontier built-in verbs will appear in |pipes|. This is because the AppleScript interpreter doesn't understand Frontier's dot syntax for object database cell addresses.

You don't need to use pipes when you're editing the scripts in Frontier, because it automatically inserts them for you. Script Debugger doesn't do this, so you'll see the pipes there, and when you save the scripts into Frontier the pipes will still be there.

The scripts will still run correctly.

Other Caveats

The protocol is not two-way. If you switch into Frontier and edit the text there, your changes will not be reflected in Script Debugger's version of the text. So if you're going to edit in Frontier, close the window in Script Debugger first.

The filespec for the editor is stored at user.odbEditors.AppleScriptEditor. If you want to change the app, delete that cell. You'll get a chance to choose a different app next time you edit something.

Perspective

As with all the new connections we're developing in conjunction with other Mac developers, this capability has no counterpart on other platforms. The combination of Script Debugger's editing power and Frontier's object storage and script runtime are unique to the Mac.

Pointers

MacWEEK did a review of Script Debugger. Contact information for Late Night Software is at the end of the review.

A similar connection is available for BBEdit, at "Editing Object Database Text with BBEdit".


© Copyright 1996-97 UserLand Software. This page was last built on 5/7/97; 1:37:50 PM. It was originally posted on 7/19/96; 8:17:21 AM. Internet service provided by Conxion.