'Class_Globals
Sub Class_Globals
public oClassActivity as activity
end sub
'Activity Code
oClass.TransmitToServer(Activity)
'Class Code
Sub TransmitToServer(oActivity As Activity) As String
oClassActivity=oActivity
end sub
sub JobDone(Job as HttpJob)
callsubdelayed2(oClassActivity,"TransmitToServer_Finished","")
end sub
I need the activity so I can CallSubDelayed2(oClassactivity,"my function","") from the class once a job is done.
Class_Globals
private oClassActivity as object
end Class
oClass.TransmitToServer(me)
sub TransmitToServer(oActivity as object)
oClassActivity=oActivity
end sub
sub jobdone(job as httpjob)
if job.success then
callSubDelayed2(oClassActivity,"TransmitToServer_Finished","")
end if
This worked
I have to encapsulate my code, so I can share it when unit testing
'Class Code
Sub TransmitToServer(vCallBack As Object) As String
oClassActivity = vCallBack
End Sub
Sub JobDone(Job As HttpJob)
CallSubDelayed2(oClassActivity,"TransmitToServer_Finished","")
End Sub