I need help with an quite simple looking piece of code!
This line always fails " uplTiFiles.RemoveAt(0)" as shown in example next.
I am very confused because first Log() shows a list keeping up to 40 file names
and second Log() shows the first file in list.
So why is it not possible to remove this file from list???
Declaration in Service module
Sub Process_Globals
Private uplTiFiles As List
End Sub
somewhere I do this in a service module:
uplTiFiles = File.ListFiles("system/app")
and inside a timer I do this
Send_File(uplTiFiles.Get(0))
Log(uplTiFiles)
Log("removing file from list: " & uplTiFiles.Get(0))
'remove from list to avoid sending it again
uplTiFiles.RemoveAt(0) ' THIS ALWAYS FAILS!!
This line always fails " uplTiFiles.RemoveAt(0)" as shown in example next.
I am very confused because first Log() shows a list keeping up to 40 file names
and second Log() shows the first file in list.
So why is it not possible to remove this file from list???
Declaration in Service module
Sub Process_Globals
Private uplTiFiles As List
End Sub
somewhere I do this in a service module:
uplTiFiles = File.ListFiles("system/app")
and inside a timer I do this
Send_File(uplTiFiles.Get(0))
Log(uplTiFiles)
Log("removing file from list: " & uplTiFiles.Get(0))
'remove from list to avoid sending it again
uplTiFiles.RemoveAt(0) ' THIS ALWAYS FAILS!!