B4J Question App Process Too Fast For UI Update

cklester

Well-Known Member
Licensed User
I'm processing some data in an app with UI elements. However, when I run the app, I get a wait-cursor and no UI activity.

I think the processing must be hogging all the time and not giving the UI any time to update.

I tried putting a Sleep(0) in a strategic location, but it still does not update my UI.

I'm not sure what the problem really is. Any ideas on where I should look or what I might be missing?
 

DonManfred

Expert
Licensed User
Longtime User
Create a small project showing the problem and upload it. Hard to help with the informations you provide. No one can answer here if we do not know what you are doing.
 
Upvote 0

cklester

Well-Known Member
Licensed User
Create a small project showing the problem and upload it. Hard to help with the informations you provide. No one can answer here if we do not know what you are doing.

OK, I will try to get a generic test uploaded here later today.
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
If there are any async calls in your recursive sub you may need to wait for every one or you are going to get unexpected results.
I don't think you want the sleep in the recursion. Then it will simply move on to one of the other recursions. Create another sub, call your recursive, slow sub from that with wait for. That will return your program to main thread and leave the slow function to continue.
 
Upvote 0
Top