If I am running a server and I have a background worker (which is a class) running, how can I read properties, modify properties and run methods of this class from other modules?
TIA
Sample Code:
TIA
Sample Code:
B4X:
'--- Main code ---
Sub Process_Globals
Public EmailMsgs1 As clsEmailMsgs
...
End Sub
Sub AppStart (Args() As String)
...
srvr.AddBackgroundWorker("clsEmailMsgs")
StartMessageLoop
end sub
'--- clsEmailMsgs Code ---
Sub Initialize
Main.EmailMsgs1 = Me
End Sub
'--- Module1 Code ---
if Main.EmailMsgs1.Running=False then 'How can I rewrite these lines using "Wait For"?
Main.EmailMsgs1.Running = true
Main.EMailMsgs1.StartEmailing
end if