I have a menu with four options. Each time a menu item is focused, an API is hit for the specific menu.
If a user switches focus between different menu at a faster rate I need to stop the task created for the previously focused menu. How can I do that?
I am showing a menu using a RowList on MainScene. The menu switching takes place on rowItemFocused of row list.
So anything I need to do has to be done from the main scene.
You need to stop the task using the task node’s control field. https://sdkdocs.roku.com/display/sdkdoc/Task
So just grab a reference to the task that you previously started and set task.control=“stop”
Let me know if you are unclear about this or need any further help. Also hit me up on the Roku Developers Slack Channel for quicker response. (see my signature)
