Thursday, 19 December 2013

Javascript Controls

Rapide now allows the use of Javascript controls in the user interface design.

In the example (from the updated Rapide sample model) a simple javascript control is created to show a traffic light which the developer can interact with using action diagram functions and the user can press to change the state.

Grid Layout

A new feature in Rapide is the ability to display the contents of a listbox as a grid instead of a simple row-based listbox.  With a grid layout, the Rapide runtime automatically displays the listbox rows in cells, with multiple cells per line, according to the overall width of the listbox. As with other types of listboxes, column data may be enhanced as images and sophisticated layout within the cell is accommodated with the same approach as row templates.

In the example below from an iPAD note how the layout adjusts automatically when the device is rotated.

Tuesday, 3 December 2013

Nullable Dates and Date Pickers

A null date in Gen (represented by datenum(0) or 01-01-0001) is valid and is often used to indicate that the date field is not set.

However most date picker controls do not support a null date - they always have a value, and so if you use a date picker OCX control, you may have to add an additional checkbox beside the date control to specify whether the date is set or not.

This workaround is easy enough to implement, but can be time-consuming if you need to implement it for many date fields across many windows and requires changes to the action diagram code to enable/disable the date control based on the setting of the checkbox.

With a conversion to Rapide, you may want to implement date pickers by default and still support null date values. To make conversion easier, Rapide now supports the concept of a nullable date picker.

This is simply done by checking the Nullable checkbox when defining the field:

The date picker is then implemented with an automatic additional checkbox to indicate if the date field is null or not.

Nullable date with no value set

Nullable date with value set