I am currently trying to get a project working which uses the threading library created by agraham. I am using this code to start the thread:
However, it instantly fails and logs the output
This code is similar to the demo code and I cannot see where I have gone wrong. I then ran the unmodified demo code, and found that it throws the same error. Maybe this library is outdated and no longer works? Or am I just doing something wrong? If there is another newer threading library then I would appreciate a link. Thanks.
Sub Button1_Click Dim params(0) As Object thread1.Start(Null, "threadSub", params) End Sub Sub threadSub For i = 0 To 20000 If i Mod 2000 = 0 Then Log(i) End If Next End Sub Sub thread1_Ended(endedOK As Boolean, error As String) If endedOK = True Then Log("Thread ended OK") Else Log("Thread did not end OK.") Log(error) End If End Sub
Thread did not end OK. Exception : Wrong number of arguments; expected 4, got 0