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.
This is an occasional blog about IET's use of CA Gen for internal development as well as thoughts, tips and techniques on using CA Gen for application development. It is aimed at the CA Gen development professional, so please excuse the jargon and assumed level of knowledge about CA Gen. Reference will also be made to our products to put the development into context, so if you are not familiar with these, please visit the IET web site by clicking on the company logo.
Thursday, 19 December 2013
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.
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:
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
Subscribe to:
Posts (Atom)