What's the "refresh" -command??

doSomething("hello") refresh doAnother("world") refresh doDifferent("please") refresh doEvenMore("help!") refresh

What’s the proper refresh command!? I have forgotten all… I don’t know what to look for or in what project this command was used…!
What a silly question!

REFRESH is used to cause the control to update IMMEDIATELY
more proper to use INVALIDATE as this “refreshs” when required (ie. it marks the control as “dirty”)

In you above example, you are wasting “time” doing refresh 3x as nothing will actually happen visually until the end of the cycle, so replacing the last “refresh” with “invalidate” yields these same result with considerable less overhead.

Refresh on OS X is quite expensive
It forces the OS window buffers to be flushed to screen immediately - and that can actually make your code run slower
It’s just how OS X works

All right.
A second thought! Refresh was actually the command as I was looking for!

The code above was… for fun!
However, it will not work in the real project. The code is inside a loop, the thread:

[code]
FOR i = 1 TO 3
me.sleep = 500
IF i = 1 THEN
strStatus = “Syncing Language…”
’ ## DOING THE SYNC TO DATABASE
END IF
IF i = 2 THEN
strStatus = “Syncing Country…”
’ ## DOING THE SYNC TO DATABASE
END IF
IF i = 3 THEN
strStatus = “Syncing Region…”
’ ## DOING THE SYNC TO DATABASE
END IF

NEXT[/code]

OK… This is sort of the code.
Inside the Timer, there is a section lblStatus.text = strStatus
and the status is shown.

The problem is, the Region status is not shown… It’s the last one. My thought was, the computer (code) has some kind of delay… I just want to speed up that delay.

The code itself is already slow to begin with, so faster code is not a goal in this specific situation. (The sync is loaded from http and http can not be too fast…)

OK, it works…
Maybe that’s good enough!?
At least, it’s something! :slight_smile:

You cannot use Refresh inside a thread. Put it into a timer.