Unable to access items in a scroll wheel that are not visible on the screen
I have the need to access items of a scroll wheel that are not visible on the screen (but that are already initialized)
For instance, I have a scroll wheel with each items a toggle button.
With the ScrollUpdateItem I'm able to set the correct index to the item with
ScrollUpdateItem(alarmsItem& item, int16_t itemIndex)
{ item.setIndex(itemIndex)where setIndex is a function that set the index in the item
Now, this works but, I've got the issue when it comes to the callback of each toggle.
For instance, once a callback is called, I need to process items different from the one selected so, I need to access the SelectorScrollListItems
For some reason, despite setting SelectorScroll.setNumberOfItems(6); I'm seeing TouchGFX generating touchgfx::DrawableListItems<alarmsItem, 5> SelectorScrollListItems; so, when I try to access SelectorScrollListItems[5] I'm seeing the call to the assert
TYPE& operator[](int index)
{
assert(index >= 0 && index < SIZE);
return element[index];
}why is that?
How do I fix it?
PS. TouchGFX Designer has the correct number of items set as well

