croezen
27th July 2010, 16:51
Hi there,
I am using mess() to let the user track what the program does.
It works fine but within an selectdo it does not show!
If I run it in debug, it shows !
example

mess("tdebns0020", 0, "start ...")

select bla bla bla
endselect

clean.mess()
mess("tdebns0020", 0, "start second step")

select bla bla
selectdo
clean.mess()
counter = counter + 1
mess("tdebns0020", 0, "busy with record " & str$(counter) )
endselect
As I said, in the debugger it works fine, but when i run the program normally it does not show the message with the counter, just blank :confused:

mark_h
27th July 2010, 19:33
Yep - I tried that in 4c3 years ago and I can't remember what convinced me that it would not work. So now I just add a status line on the bottom of the screen. I just put something in the status and do a display. It was easier to control to me. I think I also once did a progress bar, but can't remember which program that was in.

shah_bs
27th July 2010, 19:40
Try removing the clean.mess

SELECTDO processing is quite fast, so the clean.mess 'hides' the next mess().

Alternatively, you can 'slow' things down by a suspend(333) for example, after the mess(), and display the mess() every 1000 counts. Not sure if the users will like that.

Hitesh Shah
27th July 2010, 20:14
This is natural as the program runs on server and screen refresh is done client using client resources which is bit of a slow activity compared to server CPU processes .

I had similar thing for tracking the % of work done on a screen and it use to jump randomly to 100% depending on actual gaps between each screen refresh .

U can try suspend as recommended or use display or display.fld function to display messages on screen . But both these option will slow down the program . So as an alternate u may accept the current situation if not making great difference.

croezen
28th July 2010, 09:54
thanks for the info guys.

wiggum
2nd August 2010, 15:17
Remove the clean.mess() function call in your select loop. With this statement you will remove the message which was set after processing/counting the previous record.