dialog.loadFromFile

Syntax dialog.loadFromFile (path)

Params path is the full path to a file that contains a DLOG resource with ID = 25000, and a DITL resource with the same ID.

Action Copies the DLOG and DITL into the resource fork of Frontier.root.

Returns The resource ID in Frontier.root's resource fork assigned to the DLOG/DITL.

Examples dialog.run (dialog.loadFromFile ("System:Fun Dialog"), 1, @itemHitCallback)

   » true

Platform Notes This verb is only implemented in the Mac OS version of Frontier.

Notes If the file doesn't exist, dialog.loadFromFile checks in the Dialogs folder in your Frontier folder. If it exists there, it's loaded.

If you're publishing a script that uses a dialog run from the Dialogs folder, we ask that you append your initials to the end of the file name to help eliminate conflicting names.

Use this verb when a dialog may run several times from within a single script. Never depend on your dialog being loaded from run to run. If a dialog can only run once within a script, use dialog.runFromFile because it is simpler.

dialog.loadFromFile is implemented as a Frontier script, so you can examine the source code to see how it works.

See Also dialog.run

dialog.runModeless

dialog.runFromFile

Discuss