BDL 2.10 new features

Features added in 2.10 releases of the Genero Business Development Language.

Important:

This version of Genero BDL is desupported, use a more recent version of the product.

Important: This page covers only those new features introduced with the Genero BDL version specified in the page title. Check prior new features pages if you migrate from an earlier version. Make sure to also read the upgrade guide corresponding to this Genero version.

Corresponding upgrade guide: BDL 2.10 upgrade guide.

Table 1. Core language
Overview Reference
The TRY/CATCH block can handle exceptions raised by the runtime system. See TRY - CATCH block.
WHENEVER ... RAISE instructs the runtime system that an uncaught exception will be handled by the caller of the function. See WHENEVER instruction.

NULL point exceptions can now be trapped as other exceptions: Error -8083 will be raised if you try to call an object method with a variable that does not reference an object (that contains NULL):

DEFINE x ui.Dialog
-- x is NULL
CALL x.setFieldActive("fieldname",FALSE)
  -- raises -8083
In previous versions, the above code raised a fatal NULL pointer error.
See OOP support.
The base.Channel class now provides a method to establish a client socket connection to a server, with the new openClientSocket() method. See base.Channel.openClientSocket
For debugging purpose, get the stack trace of the program with the base.Application.getStackTrace() method. See base.Application.getStackTrace.
Before version 2.10, it was only possible to assign a TEXT to a TEXT variable. It is now possible to assign STRING, CHAR and VARCHAR values to a TEXT variable. See Type conversions.

The fglrun -e option now supports a comma-separated list of extensions, and -e can be specified multiple times:

fglrun -e ext1,ext2,ext3
 -e ext4,ext5 myprogram
See Loading C-Extensions at runtime.
Get an action event when the user modifies the value of a field, with the predefined dialogtouched action, to detect first user modifications. See Immediate detection of user changes.
The parse() and toString() methods are now available for a om.DomNode object. See The DomNode class.
A om.DomDocument object can be created with createFromString(). See The DomDocument class.
The TEXT and BYTE data types now support the methods readFile(fileName) and writeFile(fileName). See BYTE, TEXT.
Table 2. User interface
Overview Reference
The new DIALOG instruction handles different parts of a form simultaneously. See Multiple dialogs (DIALOG - inside functions).
HBox and VBox containers can now have a splitter. See SPLITTER attribute.
The new DOUBLECLICK table allows to configure the action to be sent when the user double-clicks on a row. See DOUBLECLICK attribute.

Define a timeout delay for front-end connections with the following FGLPROFILE entry:

gui.connection.timeout = seconds
See GUI connection timeout.
Before version 2.10, it was only possible to assign a TEXT to a TEXT variable. It is now possible to assign STRING, CHAR and VARCHAR values to a TEXT variable. See Type conversions.
Presentation styles have been extended:
  • The style attribute "position" for Windows™ can be set to "previous".

  • TEXTEDIT now has the "textSyntaxHighlight" attribute (value can be "per", more to come...).

  • All widgets can now use the "localAccelerators" global style attribute to interpret standard navigation and editor keys (like Home/End) without firing an action that uses the same keys as accelerators.

See Presentation styles.
Get an action event when the user modifies the value of a field, with the predefined dialogtouched action, to detect first user modifications. See Immediate detection of user changes.
Use the validate="no" action default attribute to prevent data validation when executing an action. See Data validation at action invocation.
Define a minimum width and height for forms with the MINWIDTH, MINHEIGHT attributes. See MINHEIGHT attribute, MINWIDTH attribute.
In INPUT ARRAY, avoid the automatic creation of a temporary row with the new AUTO APPEND = FALSE dialog attribute. See Appending rows in INPUT ARRAY.
Table 3. SQL databases
Overview Reference
Support for SQL Server 2008 (using SQL Server 2005 Native Client) See Microsoft SQL Server.
The fgldbsch tool now supports the X conversion code to ignore table columns of a specific type. This is useful for ROWID-like columns such as SQL Server's uniqueidentifier columns. See Data type conversion control.
Before version 2.10, SQL interruption was not supported well for some databases. SQL interruption is now available with all databases providing an API to cancel a long-running query. See Using SQL interruption.
Table 4. Web Services
Overview Reference
The Genero Web Services XML library (xml) has been added. This library provides classes and methods to perform:
  • XML manipulation with a W3C Document Object Model (DOM) API
  • XML manipulation with a Streaming API for XML (StAX)
  • Validation of DOM documents against XML Schemas
  • Serialization of BDL variables in XML
  • Creation of XML Schemas corresponding to BDL variables
See The xml package.
New classes have been added to the Genero Web Services COM library to facilitate low-level XML and TEXT over HTTP and TCP Client communication (com).

The Genero Web Services com library provides two classes, HTTPRequest and HTTPResponse, to perform low-level XML and TEXT over HTTP communications on the client side. Two more classes, TCPRequest and TCPResponse, are also provided to perform low-level XML and TEXT over TCP communications on the client side. This allows communication between applications using the core Web technology, taking advantage of the large installed base of tools that can process XML delivered plainly over HTTP or TCP, as well as SOAP over HTTP.

Specific streaming methods are also available to improve the communication by sending XML to the network even if the serialization process is not yet finished, as well as for the deserialization process.

It is also possible to prevent asynchronous requests from being blocked when waiting for a response, and to perform specific HTTP form encoded requests as specified in HTML4 or XForms1.0.

See The HTTPRequest class, The HTTPResponse class, The TCPResponse class and The TCPResponse class.
The fglwsdl tool now generates low-level and asynchronous client stubs from the WSDL.

The fglwsdl tool generates all client stubs with the low-level HTTPRequest and HTTPResponse classes of the com library to perform HTTP communications. The low-level generated stub also takes advantage of the streaming methods, if Document Style or RPC-Literal web services are performed. Streaming is not possible with RPC-Encoded web services, as nodes can have references to other nodes in the XML document, requiring the entire document in memory to perform serialization or deserialization.

The fglwsdl tool also generates two new BDL functions for each operation of a Web service. These two functions enable you to perform asynchronous web service operation calls by first sending the request, and retrieving the corresponding response later in the application. This allows you to prevent a BDL application from being blocked if the response of a web service operation takes a certain amount of time.

See The HTTPRequest class, The HTTPResponse class, and fglwsdl.
Genero Web Services provides an enhanced fglwsdl tool that is able to generate Genero data types from a XML schema. The data types can then be used in your application to be serialized or deserialized in XML. The resulting XML is a valid instance of that XML schema, and validation with a XML validator will succeed. See fglwsdl.