List index problem (list Get)

listview
list

#1

Hi all,

in my code i use a textinput to fill a list (of 8 elements) then i use “shuffle” on the list and i split it in two separate lists of 4 elements each.

if i use a listviewer on my shuffled list it display correcly all 8 elements but in my other 2 lists it seems like I lost the first number so the second element is shown as first and the 8th is missing

(mescolato is my shuffled list, and i’ve used List_Viewer5 only to know if mescolato was correctly shuffled)

what perplexes me is that this happens only sometimes, it almost seems that sometimes the list index starts with #1 and others with #0.

Any clue?


#2

Yepper,

When you open a screen you need to give it time to open. Create a process/function and nest those elements in the function.


#3

hi, thanks for the help,

i’m pretty new so correct me if i’m wrong, i’ve to create a function where i split in two list and then call that function when i open the screen?


#4

Correct.

Pull stuff away from the immediate trigger on screen open. Let the screen open and settle. If you have a bunch of background stuff going on, it can slow the screen opening down and cause issues to skip, stall, or hit null>void.


#5

Unfortunately it’s the same,
i also tried to add a button that call my function so i can leave it some time to load, but the got the same result. :frowning:


#6

and it works sometimes and other times it does not even with the button? (nice job with that. Great way to debug)


#7

yes, no changes, even with the button,
in my opinion it’s a index issue, cause i’ve done another test:
asd
i’ve removed the function and added a label where i will put the value of the #0 element in list.
When the error occour the label change from “undefined” to “first element of list”, so it seems that sometimes lists starts at 0 :astonished:

it’s this possible?:thinking:


#8

You still have it in the Screen Opens. Don’t include this complex logic in that block


#9

List indexes have been an issue for a while


#10

So it’s probably a bug and not some errors of my code?