----------------------------------------------------------------------------- Set a new value in the device, selected by item label -----------------------------------------------------------------------------
| 275 | // Set a new value in the device, selected by item label |
| 276 | //----------------------------------------------------------------------------- |
| 277 | bool ValueList::SetByLabel |
| 278 | ( |
| 279 | string const& _label |
| 280 | ) |
| 281 | { |
| 282 | // Ensure the value is one of the options |
| 283 | int index = GetItemIdxByLabel( _label ); |
| 284 | if( index < 0 ) |
| 285 | { |
| 286 | // Item not found |
| 287 | return false; |
| 288 | } |
| 289 | |
| 290 | return SetByValue( index ); |
| 291 | } |
| 292 | |
| 293 | //----------------------------------------------------------------------------- |
| 294 | // <ValueList::OnValueRefreshed> |
no outgoing calls
no test coverage detected