dialog.run

Syntax dialog.run (resnum, defaultitem, itemhitcallback)

Params resnum is the resource number of a DLOG resource

defaultitem is the item that's bold in the dialog and acts as the default response if the user hits the Return or Enter key.

itemhitcallback is the address of a script to be executed when an item in the dialog is hit and the user's action must be processed.

Action Runs a modal dialog.

Returns True

Examples See the Frontier script dialog.getInt for an example of the use of this verb.
Platform Notes This verb is only implemented in the Mac OS version of Frontier.

Notes This is an advanced Frontier verb of primary interest to implementers and advanced scripters. It is not necessary to understand it to use Frontier effectively for most tasks.

Dialog resources to be used in Frontier must be stored either in Frontier.root or in the Frontier program resource fork.

The callback script should take one parameter: the dialog item that was hit. This parameter is usually processed inside a CASE statement in the script.

Before the dialog is displayed and user input is accepted, the callback script is called with the special item value -1, to allow it to initialize the dialog's items as appropriate.

The callback script should return false to dismiss the dialog

See Also dialog.runModeless

Discuss