-
Hello, Did I miss something ? Getting the selected index is much easier and work fine ;) Nota : yes, I have to use my own store/load function in a more larger settings environment (BLE, TFT/keys ...) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
What does the index point to? Do you want to add a string as the nth-option that can be selected as a SELECT element? NOTE |
Beta Was this translation helpful? Give feedback.
-
The substance of the element value of ACSelect is stored in the sequence container created by std::vector. Therefore, it cannot store the value by specifying an index that directly indexes the element value. |
Beta Was this translation helpful? Give feedback.
The substance of the element value of ACSelect is stored in the sequence container created by std::vector. Therefore, it cannot store the value by specifying an index that directly indexes the element value.
Also, the insertion of std::vector can be positioned using an iterator, but it is a relative position, not the absolute coordinates indicated by the so-called index.
(e.g. If the container has 1 elements currently and you try to insert it 3rd (as index), the result will be undefined. (which will probably cause a segfault)
Therefore, your requirement does not conform to the data structure of ACSelect.