Can RemoveItem affect item 0?
Posted: Fri Jan 29, 2016 10:23 am
I am having a bug which makes no sense.
Idea is that to have my items in list in right order, I am adding "empty" item to list location 0, since otherwise the first item (0) would be executed first. However, this "empty" item is there only temporary and is removed after the loop:
Now problem is, some strange way this "empty" ends up staying there in one case causing a crash bug, and i cant really figure out what is causing this.
So far only line that has anything to do with tables inside that function seems to be that I am using RemoveItem for t_tables items that are greater than 0 in some cases.
Therefore, is there any possibility that when for example item number 2 would be removed using RemoveItem, that Item number 0 would change its spot to some other number location?
Idea is that to have my items in list in right order, I am adding "empty" item to list location 0, since otherwise the first item (0) would be executed first. However, this "empty" item is there only temporary and is removed after the loop:
Code: Select all
Insertitem(t_table, "empty", 0)
foreach(t_table, Function (cell, data)
if cell = "empty" then return
other stuff to be done
endfunction )
removeitem(t_table, 0)
So far only line that has anything to do with tables inside that function seems to be that I am using RemoveItem for t_tables items that are greater than 0 in some cases.
Therefore, is there any possibility that when for example item number 2 would be removed using RemoveItem, that Item number 0 would change its spot to some other number location?