Adds a synthetic string property, generated from a definition
string and other properties in the model.
The definition
string, similar to how printf
works, contains ${} placeholders that are replaced by the actual value of the property inside the placeholder tags when the synthetic property is retrieved. For example, a numeric property length
might be strange to use as a label, since it will only display a number. However, a synthetic string can be generated with the definition "Length ${length}." which renders more nicely and does not require any more code by the user of the property.
not_ready
and on_error
strings can be given to be used when the data is not ready or there is some error, respectively. These strings do accept placeholder tags.
See Efl.Ui.View_Model.property_string_del
Since 1.23
property_string_add { params { @in name: string; @in definition: string; @in not_ready: string; @in on_error: string; } return: Eina.Error; }
Eina_Error efl_ui_view_model_property_string_add(Eo *obj, const char *name, const char *definition, const char *not_ready, const char *on_error);
definition
is not ready yet. If set to null
, no check against EAGAIN will be done.definition
is in error. It takes precedence over not_ready
. If set to null
, no error checks are performed.