Manual

Manual · API

application

The application itself — what it is called, which version it is, and the one way to end it.

Every command on this page carries a worked example.

quit function

application.quit()

Ends the application — the honest way for a script that closed the last window on purpose.

Worked example
// A sign-in that failed three times leaves.
messages.showError("Three wrong attempts — the application will close.");
application.quit();

name property

application.name

What the application is called — the project's name, as built.

Worked example
form.aboutLabel.value = application.name + " " + application.version;

version property

application.version

e.g. "1.4" — the version the build carried.

Worked example
if (application.version !== settingsRecord.lastSeenVersion) {
    forms.open("WhatsNew");
    settingsRecord.lastSeenVersion = application.version;
    settingsRecord.save();
}

buildNumber property

application.buildNumber

Grows by itself with every release build.

Worked example
log("Running build " + application.buildNumber);

builtWith property

application.builtWith

Which Neuridion built this — "0.9.1 (16)". An imprint, read by nothing.

Worked example
// The support line: which Neuridion made this?
log(application.name, application.version, "· built with", application.builtWith);

bundleIdentifier property

application.bundleIdentifier

e.g. "com.example.Invoices" — where the application keeps its data.

Worked example
log(application.bundleIdentifier);   // "com.example.Invoices"