Cosmos

Technical Notes 7.4

This version generates incompatibilities with previous versions.

Implementations and improvementsIr al principio de la página

Cosmos WebServer

Multithread

The possibility that Cosmos WebServer is multithreaded has been implemented.

For this, a new environment variable, called NUMBEROFTHREADS, has been incorporated, which is responsible for activating or deactivating this funcionality.

HTTPS Protocol

The possibility that Cosmos WebServer can be configured with the HTTPS protocol has been implemented. See later.

Headers

The possibility that a Cosmos Webserver service can obtain the value of the headers of a request has been implemented.

A new parameter has been added to the services configuration file: headerParameter.

Print reports in PDF format

The possibility of printing reports in PDF format has been implemented. This can be done by any of the following procedures:

Multi-language

The possibility of changing the multi-language file at runtime has been implemented, as well as being able to load a multi-language file and not automatically modify the form literals with the translated texts.

The possibility of consulting the translation of a literal within a multi-language file has also been added.

ODBC connections with Microsoft Sql Server

The possibility of using the variable LOOKUPOUTERJOIN in ODBC connections with Microsoft Sql Server has been implemented.

For that, the LOOKUPOUTERJOIN variable must be used together with the new variable ODBCSQLSERVER, which will be responsible for telling Cosmos that the ODBC connection is with MS Sql Server.

Java Method Call

The possibility of telling Cosmos which virtual machine version should use to run the Java methods has been implemented. For this, the environment variables COSMOSUSELASTJAVAVERSION y COSMOSUSEJAVAVERSION have been created.

The Java virtual machine version must be 1.8 or lower.

AutoFit property

The internal identifier of this property has been changed so that when the graphic component (template) of the Page class, or a PAG file is edited, the property is not automatically marked.

Due to this modification, it will be necessary to edit the PAG files and select the property.

This modification also causes Cosmos programs to be recompiled.

Controls

Edit Field

The possibility of assigning a value to an Edit Field control of type Date / Time picker has been implemented.

Lists

The possibility of modifying the value of a cell has been implemented, as well as dynamically choosing the type of selection that you want to make in a list (List Box control).

The possibility of adding a button to the Edit String and Edit Numeric fields has been implemented in the editable lists. Clicking on that button will launch the ListEditButtonClick event.

Drop Edit and Drop List

The possibility of dynamically adding icons to these controls has been implemented. The Icon property of the control will be used for this.

Excel export

From this version, if the path of the Excel file is not indicated as a parameter, the ExportToExcel method will show by default the possibility of saving it in xlsx format.

Preview window

In the Cosmos print preview window, a new button has been added to be able to print the reports in PDF, as well as a new editing field to indicate the page number of the report to be displayed.

The “PDF” button can be hidden using the HideExportPDFButton method.

IDE

The list of recently opened projects will show the complete path and not just the name as in previous versions.

Icon palette. From this version on, the window can be resized, thus enabling the complete display of the icon file.

CSQL

The attachconnection instruction has been implemented to allow the connection to a database using the identifier defined in the connections section, thus avoiding having to select it from the "database/select connection" menu.

attachconnection <conexion>

Mwlisten

The information shown in the log file has been expanded. As of this version, the date and time of the log entry is recorded in the log.

In addition, while waiting to receive a new connection, it displays the message “waiting for connection...”

New methodsIr al principio de la página

JSON Class

SetNull

The SetNull method of the JSON class has been implemented, which allows you to assign a null value to a property or to a JSON object.

Clase Module

GetMultilanguageTranslation

This method returns the translated label of the multilanguage file from the original label.

IsLicenseRegistered

This method allows to know if the Cosmos license is registered on the PC where it is running.

SetMultilanguageFile

This method allows to change the multilanguage file during application execution.

SimpleControl Class

GetListSelectionType

This method returns a smallint type value with the list’s selection type: (0 - NONE, 1 - SINGLE, 2 - MULTISELECT).

SetListColumnEditButton

This method allows to assign a button to all the cells in a column of an editable list control (String or numeric with values 1 and 5 in the editStyle parameter of the SetListcolumnEditType method of the SimpleControl class).

SetListColumnText

This method allows to modify the value of a cell in a List Box control (string and tree).

SetListSelectionType

This method allows to change the selection type of the list control.

Clase PrnDocument

HideExportPDFButton

This method allows to hide the “PDF” button in the Preview window.

OpenPrinterPDF

This method allows to print the Cosmos reports in PDF format.

Api PrnPag32.dll

OpenPrinterPDF

This function allows to print the Cosmos reports in PDF format.

EventsIr al principio de la página

ListEditButtonClick

This event is launched when a users clicks over the button in an edit field inside a List control that shows a button (SetListColumnEditButton method).

Environment variablesIr al principio de la página

Cosmos WebServer

Multithread

HTTPS protocol configuration

In order to configure the connections in CWS to be over HTTPS, the following variables must be defined in the service configuration file:

Bug fixesIr al principio de la página

In this version several corrections have been made in the Runtime.