Smart CODE | |
Your on-line guide to the generated code |
The code for automated group processing is found in the group base class in Java and C++. In C, a number of fields at the start of the group data structure are shared between the base AnyGroup_t and each specific group instance, a technique that will be familiar to programmers who have worked with X events.
The automated API is not intended for use by programmers, and is currently private. It is mentioned here to explain why example code will often cast the group object in a smart code data structure to the appropriate type.
The group object is only intended as a container for the elements in the group. The code that handles creation of the group object, in the directory groups_<c|cpp|java> has the same status as the X-Designer code file. it is regenerated each time. All other smart code files are regenerated only if they are not present, and are required.
To program using the Group data structure, you will need to know the names of the controls and extra data elements that comprise the group. On the client side, each element will have one or more getters and setters corresponding to resources that represent the data the user has entered/selected in the control. One such resources is taken as the "default" or characteristic resource for the control, and this is sent down to the server.
The Group data structure is the same on the Server side. The only difference is that the controls on the server side are simple dataobjects such as booleans, strings and integers, and not complex user interface controls. They are also accessed through a single get()/set() pair. The server side group members have a single value that corresponds to the default value of the control on the client side.