Android Question How to wait for

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Hi, I have a class which gets a html page and writes to a sql database.
I need to wait for it to finish.

I call it from some other activities using:

s.Initialize
s.wNtSyncro(0,0)

Now, trying to use wait for, as I understood from the PDF manual (4.6.4), I add the following line in the JobDone Sub of my class:
CallSubDelayed(Me,"SyncOk")

and in my calling code

s.Initialize
s.wNtSyncro(0,0)
Wait For SyncOk

Then I get an error: Sub SyncOk was not found.

How to do it?
Thanks
 

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
I am trying with this code too, it runs ok but...

s.Initialize
Log("### wait...")
wait for (s.wNtSyncro(0,0)) Complete (result As Boolean)
Log("### back from wait...")
DoUpdateList
Log("### back from DoUpdateList...")

the ### wait...
appears in the log
then all the wNtSyncro logs
and then nothing!
It neves runs ### back from wait !
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Hi, I have a class which gets a html page and writes to a sql database.
I need to wait for it to finish.

I call it from some other activities using:

s.Initialize
s.wNtSyncro(0,0)

Now, trying to use wait for, as I understood from the PDF manual (4.6.4), I add the following line in the JobDone Sub of my class:
CallSubDelayed(Me,"SyncOk")

and in my calling code

s.Initialize
s.wNtSyncro(0,0)
Wait For SyncOk

Then I get an error: Sub SyncOk was not found.

How to do it?
Thanks

Try this in Debug mode and not release mode. Unless your sub has an underscore, obfuscation will blow this away.
 
Upvote 0
Top