FAQ

该文档是已过时的旧文档

The most complete and up-to-date documentation is the one of Banana Accounting Plus: Try it now

In this article

Can I call an external program within a BananaApp?

For the moment, for security reason we do not allow BananaApps to works directly on file and call external programs.

Can I create QML (QtQuick) apps?

With QML application have extensive access to the computer.
Fot the moment, for security reason we do not allow BananaApps to use QML.

How can I get the start and end date of the accounting?

var openingDate = Banana.document.info("AccountingDataBase","OpeningDate");
var closureDate = Banana.document.info("AccountingDataBase","ClosureDate");

Note: the keywords "AccountingsDataBase", "OpeningDate" and "ClosureDate" correspond to the values in the columns "Section Xml" and ID Xml" of the table "Info file". See command "Info table" under the menu "Tools".

Can I save and recall in a script the values entered by the user?

Yes, use the functions Banana.Document.scriptSaveSettings and Banana.Document.scriptReadSettings.

Settings are saved and restored in the current accounting file under the script id, if you change the id your settings will not be retrieved.

// Initialise parameter
param = {
   "searchText": "",
   "matchCase": "false",
   "wholeText": "false"
};

// Read script settings
var data = Banana.document.getScriptSettings();
if (data.length > 0) {
   param = JSON.parse(data);
}

...

// Save script settings
var paramString = JSON.stringify(param);
var value = Banana.document.setScriptSettings(paramString);

Accented letters are displayed wrong

Save the script file in UTF-8.

Can I protect the app?

If you don't want to someone easily change the js file, you can package it in a rcc file.

 

 

 

Share this article: Twitter | Facebook | LinkedIn | Email