Label refresh freezes on windows issue

Hi !

I have an issue refreshing a label on windows. In mac works fine.

Thats what must the program supposed to do:

Download a list of files about 500 to 1000 links.

Every time a file is downloaded, the label will be updated: File (i) downloaded sucessfully.
in case of 500 files it says from 1 to 500.

I repeat, it works on Mac, but when i run in windows, go 1 to 7 and then freezes. (The files are downloading correctly), but label doesn’t show the download status.
Only when the for games to 500, then shows the message “500 Files downloaded sucessfully”.

Is this a issue a program, or I need to modify something:

I¡m using a for Next
and Label.text = “File " + Cstr((i)) + " downloaded successfully”
Label.refresh /////To refresh the label each time a new file is downloaded.

Thanks

Read https://forum.xojo.com/28739-how-to-force-a-refresh-on-64bit

and if you can decipher anything definitive from the link posted above, you’re a better man than I, Gunga Din. :slight_smile:

Well. I think the last word should go to the guy in charge of all Xojo development, who probably knows better :

I know some hate it, but it maybe time to shed old stuff and embrace the new. That is threads and timers.

The other thread discusses Mac

This one is on Windows and doesn’t actually mention 64 bit

if you make the number of files a property of the window, try updating the label using a timer that fires every so often.

That does not preclude the fact that updating a label with Refresh with modern systems including Windows 10, and soon Project C - Centennial Bridge, is not a good idea.

In the other thread, I and Norman Palardy posted simple methods using timers and NO refresh which perfectly well update a label in compliance with the new systems recommendations of avoiding long processes in events.

BTW I just verified that Refresh indeed does not allow displaying data in a label during an event in 2015R4 from a loop. The display shows up only at the end of the event.

I feel the reasonable attitude is not to moan that it worked fine in the past, but to do what is required for it to work in the future.

OK. On Mac Refresh still works on a label in 2015R4 in 32 bit, but not in 64 bit.
On Windows, it does not work in either 32 or 64 bit.

Using a timer for the loop without any Refresh works in all four.