User Tools

Site Tools


Sidebar

project:openprojectdialog

openprojectdialog()

Function that shows the user a dialog to choose a project to open. The user must select an XPJ file to open the project. The difference between this function and the function openproject() is that this function will prompt the user for a project.

Note: Always use this function or the function openproject() to open a project. This ensures that the global variable currentProject is set. If this variable is not set, several functions in the library may not work as expected.

Usage

To open a project and check that the user didn't cancel in the dialog:

if(openprojectdialog()) {
  //Do something for the project.
} else {
  alert('You must open a project to run this script");
}

Parameters

Parameter Data type Required Description
updateifrequired boolean If set to true the project will be updated if the project is from a previous version. Default is false

Return Values

Value Meaning
true The project was opened
false The project could not be opened
project/openprojectdialog.txt · Last modified: 2017/06/03 13:19 (external edit)