Banana.Application

Deze documentatie is verouderd

De meest volledige en bijgewerkte documentatie is die van Banana Boekhouding Plus: Probeer het nu

In this article

Banana.Application represent the interface to the program and can be accessed through Banana.application.

Properties

isBeta

Return true if the application is a beta version.

var isBeta = Banana.application.isBeta;

Since Banana 8.0.7

isExperimental

Return true if the application is a beta version.

var isExperimental = Banana.application.isExperimental;

Since Banana 8.0.7

serial

Return the serial of the application in the form of "80006-170428".

var serial = Banana.application.serial;

Since Banana 8.0.7

version

Return the version of the application in the form of "8.0.4".

var version = Banana.application.version;

locale

Return the locale of the application in the form of "language_country", where language is a lowercase, two-letter ISO 639 language code, and country is an uppercase, two- or three-letter ISO 3166 country code.

var locale = Banana.application.locale;

progressBar

Return an object of type ProgressBar used to give the user an indication of the progress of an operation and the ability to cancel it.

var progerssBar = Banana.application.progressBar;

 

Methods

addMessage(msg [, idMsg])

Add the message msg to the application. The message is showed in the pane "Messages", and in a dialog if the application option "Show Messages" is turned on.

If idMsg is not empty, the help button calls an url with script's id and message's id (idMsg) as parameters.

Banana.application.addMessage("Hello World");

See also: Table.AddMessage, Row.AddMessage, Document.AddMessage.

clearMessages()

Clear all the messages showed in the pane "Messages".

Banana.application.clearMessages();

showMessages([show])

Enable or disable the notification of new messages through the message dialog.

Banana.application.showMessages(); // Next messages are showed to the user through the message dialog.
Banana.application.showMessages(false); // Next messages will not pop up the message dialog.

openDocument(ac2FilePath [, password] [, title])

Open the ac2 file located in filePath and return an Object of type Banana.Document or undefined if the file is not found. The path can be relative, in this case the base directory is the path of the current document.

If the path is empty or contains a "*" or a "?" an open file dialog is showed to the user, and the title is used in the caption of the file open dialog.

With this function you can also open ISO 20022 and MT940 files, in this case a cash book with the transactions of the file is returned.

var file1 = Banana.application.openDocument("*.*");
if (!file1)
   return;

var file2 = Banana.application.openDocument("c:/temp/accounting_2015.ac2");
if (!file2)
   return;

 

Share this article: Twitter | Facebook | LinkedIn | Email