[09 Aug 2009] RemoveItem()
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on 09 Aug 2009 14:54:30 +0000
Hello,
was it already known that there is a problem with RemoveItem() when doing this on the first item? If there is only one row the example below works too. What makes me wondering too, is that I have to bring in another helpervariable to make it work for any other row than the first. If not, this codesnippet fails when removing the first row, whenever there is more than one row:
Hello,
was it already known that there is a problem with RemoveItem() when doing this on the first item? If there is only one row the example below works too. What makes me wondering too, is that I have to bring in another helpervariable to make it work for any other row than the first. If not, this codesnippet fails when removing the first row, whenever there is more than one row:
Code: Select all
Function p_RemoveClub()
Local id = StringRequest("Enter ID","Enter ID of Club to remove","0")
If (id <> "" AND id <>"0")
If ClubCount > 0
For i = 0 To ClubCount-1
If ToString(t_club[i][0]) = id
/*Entry To be removed got identified*/
y = i
For t=(ListItems(t_club[y])-1) To 0 Step -1
RemoveItem(t_club[y])
Next
ClubCount = Sub(ClubCount,1)
Break
ElseIf(t_club[i][0] > id)
Break
EndIf
Next
EndIf()
EndIf()
EndFunction