Advanced Dynamic Objects
Lesson 7 - Other Functionalities
- In addition to inserting and removing dynamic objects, the modification phase provides support for other types of interactions. A complete list of implemented interactions can be found on the last pages of the dynamic objects manual.
- One special interaction to note is using dynamic objects in an application. For example, suppose the sample application that was just built was to be extended with actual saving functionality. This means the ‘psValue’ of the dynamic object must somehow be retrieved, which, in turn, means the handle of the object is also needed. To get the handle of a dynamic object, the ‘DynamicObject’ function is used. This function takes the unique ID of the object, the handle is needed for, as an argument. It then creates the dynamic object on the server and returns the handle.
- Getting and setting Web Properties of dynamic objects happens exactly as for regular objects. WebGet and WebSet operations can be used on dynamic object handles just as they would be in a normal, ‘static’ environments.
RECAP
Getting started with integrating dynamic objects into an application takes some practice. Therefore, the following five-step workflow is recommended:
- In the first step, create the dynamic container to hold dynamic objects.
- In the second step, define (or just identify) the specific behavior of the dynamic objects.
- In the third step, write the code to initially fill the container with dynamic objects.
- In the fourth step, instruct the container to render its content.
- And finally, in the fifth step, modify the content and structure of the container, by adding, moving, or removing objects.
Mentioned resources in this lesson:
- Download the Dynamic Objects manual for DataFlex 19.1 for information about:
- Complete list of interactions
- Detailed 5 steps and code examples
- DataFlex sample applications in DataFlex 19.1 with Dynamic Objects: