Courier V3.6
Data Context
Support for a Candera node 2D/3D based local data context for binding sources. Behavior/widget property bindings will be bound to the nearest binding source instead of the global binding source from the model. This enables:
- The usage of courier data binding within different contexts (e.g. each item of a list can act as a binding source for controls).
- Using standard Courier data binding for data items within list items.
Data Context Item
Each binding source can be marked as a Data Context Item by setting the flag dataContextItem to true. As a result the binding source data struct will be derived from the Data Context Item base class. Data Context Items can be handled with shared pointers. However, they will be cloned automatically when they are used as a list item. this ensures that there is no need to add synchronization handling in the view. The cloning is only performed on the struct. Each member will be cloned by using its copy constructor. If this results in a shallow copy (e.g. like for other shared pointers, reference, pointers, ...) then the instance is shared between the model and the view. Synchronization handling has to be considered within the application code for those items. The Data Context Item also enables the binding to generic lists with items of different dynamic data type (e.g. for inhomogeneous lists).
Courier List model improvements
The list model has been improved:
- Dynamic list fragment: If no maximum and no window size is given in the xml specification then the list fragment will use a dynamic fragment size with variable maximum length.
- No need to provide a maximum size for list fragment: If a window size is given in the xml specification then no maximum size has to be provided (which also had been ignored in the past in that case).
- Modified flags for list items: In addition to the single modified event approach the list model interface (including list fragments) provide a set of modified flags to enable a single update message whenever several list items are modified (e.g content or position). All flags will be reset after the update message of the binding source is sent.
- Automatic setting of list item modified flag: Whenever a list item is modified with the list model interface its modified flag is set in the modified flag set.
- Manual modified flag handling of list items: To handle false positives of modified flags an interface is available to reset the modified flag manually.
- Modification of data item within a data context: To enable the notification of the model of data item change request within a local data context binding source (e.g. a single data item within a list item has to be changes to a specific value) the UpdateModelMsg has been extended by the ChangeDataItem request. This allows the modification of list content with the highest possible precision simply with standard Courier data binding.