Radio UserLand Kick Start: Writing an Outline

Writing an Outline

This is part of Chapter 8 of the book Radio UserLand Kick Start by Rogers Cadenhead, published by Sams Publishing

To begin a new outline in Radio, choose the menu command File, New. A window appears with a gray triangle next to a blinking cursor. The text of an outline item can be entered at that cursor.

The outliner functions like a text editor. When you press the keyboard Enter key (Return on the Mac), a new outline item is added and the cursor moves to accept input at that position.

PC users might run into some confusion because there are two Enter keys on most PC keyboards and they accomplish different things in Radio's outliner (see Figure 8.4).

Enter keys on a PC

Figure 8.4.

Hoisted items in an outline.

When entering items in an outline on Windows, use the keyboard Enter key, not the keypad Enter key.

Macs avoid this problem by having a Return key and an Enter key -- enter items with the Return key on a Mac.

To move the cursor to a different item in an outline, use the four arrow keys.

As items are being entered, they can be moved using four commands of the Outline, Move menu:

  • Outline, Move, Up
  • Outline, Move, Down
  • Outline, Move, Left
  • Outline, Move, Right

An example outline is shown in Figure 8.5.

A stock portfolio outline

Figure 8.5.

A stock portfolio outline.

On the Move menu, the Up, Down, Left, and Right commands move the item in that direction if such a move is possible.

Moving an item up or down changes the order of subheads that share a common parent. Moving an item left or right changes the parent of the item.

There are many instances where it isn't possible to move an item in a specified direction, depending on the placement of the item in relation to its parent and other subheads. For example, in Figure 8.5 the item "52 shares at 18.19" can only be moved to the left. It's directly below a parent, making a move to the right impossible, and it has no other subheads, preventing a move up or down. Radio keeps track of this automatically, preserving the structure of an outline by ignoring impossible requests.

When an item is successfully moved, all of its subheads move along with it, even if they are collapsed away from view.

Keyboard shortcuts for each of the move commands are shown in Table 8.1.

Table 8.1: Movement Shortcuts

Up Ctrl-U Cmd-U
Down Ctrl-D Cmd-D
Left Ctrl-L, Shift-Tab Cmd-L, Shift-Tab
Right Ctrl-R, Tab Cmd-L, Tab
Direction Windows Mac

The outliner can be used as a programmer's editor for UserTalk, Radio's built-in scripting language, and other programming languages.

To support this purpose, an item in an outline can be designated as a comment, a descriptive statement explaining what a script is doing at a particular place in a program. Comments will be ignored when Radio runs a UserTalk script.

The menu command Outline, Toggle Comment turns a normal outline item into a comment and vice versa. There's also a keyboard shortcut for this command: Ctrl- (backslash) on Windows and Cmd- on Macs.

The icon for a comment is a chevron character ("<<"). The outline in Figure 8.5 includes one comment: "Last update: 01/14/2003".

A comment can have subheads of its own as long as all of them are comments also. Radio handles this automatically when toggling comments -- if an item with three subheads is turned into a comment, all four become comments.

Later, if this item is changed from a comment to a normal item, all of its subheads will become normal items unless they were separately turned into comments at some point.

Tip: When modifying a UserTalk script, Radio developers often put a timestamp in a comment along with a description of the changes that were made on that date. To insert a timestamp containing the current date, time, and your initials in an outline, press Ctrl-4 (Windows) or Cmd-4 (MacOS). Radio's object database includes many comments of this kind to track the development history of scripts.

To save an outline, choose the menu command File, Save. The first time the file is saved, a name can be given to the file or a default name such as untitled.opml or untitled-2.opml will be used.

Outlines are saved as OPML (Outline Processor Markup Language), a format created by UserLand for the representation of outlines. Files are given the file extension .opml and the MIME type text/x-opml.

Chapter 8:

  1. Introduction
  2. Understanding Outlines
  3. Writing an Outline
  4. Modifying an Outline
  5. Viewing an Outline
  6. Using Links in an Outline
  7. Summary

Radio UserLand Kick Start home page