bundle

Syntax bundle

statements

Action Executes statements once.

Examples bundle // set up the object database for a new run
app.clearNetworkApp ()

Frontier.pathstring = file.getPath ()

menu.currentsuite = ""

modes.currentmenu = 0

Type this script into a script window. In this example, a fragment of Frontier's standard startup script, the bundle statement serves purely as an encapsulation mechanism. The four statements in the bundle are executed exactly as if they appeared in line,
outside of the bundle. The bundle statement provides additional structure to the script so that the statements can be expanded and collapsed together, and have a single comment that describes their combined action.

bundle // make sure the user has a notepad outline
local (notepad = @peopletable^.notepad)

if not defined (notepad^)

new (outlineType, notepad)

Type this script into a script window. This example, taken from Frontier's "user.login" script, illustrates an additional encapsulation property of the bundle statement. By declaring the "notepad" local variable within the bundle, its scope is only over
those statements that actually work with it. As in the first example, the bundle statement can be collapsed leaving just its comment visible.

See Also on

local

@

^

Discuss