When widgets have no labels or labels are not unique, currently we use indices to identify them. This creates potential problem when widgets added/removed, so that indices may change. This can be improved if we could use a widget's data for identification.
We add a new argument -data to widget selector commands (like get-button, get-editbox, etc.). A data argument can accept either a string value (if application uses something like widget.setData("widgetName")), or a key/value pair (if application uses widget.setData("name", "widgetName")).
On Options tab in a Control Panel we add a new pair of options (similar to what we have for 'use text contexnt for part identity'):
- Checkbox 'Use widget data when name is not unique'
- Textbox 'Use following keys as widget name' – comma-separated list of keys which can be used, default value just name
So that when this feature is enabled and widget's name is not unique, Q7 will check whether getData by given keys/without a key is available and unique.