Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wait while stops showing the number
Message
 
 
To
21/09/2020 01:46:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01676163
Message ID:
01676181
Views:
63
UPDATE 2. It appears that the only time the WAIT messages "freezes" is when I click on Exit button, while the WAIT goes on. The form which starts the report has EXIT button (and CREATE button, along with some choices). So, if I let the report creating run without clicking anything, the WAIT does not freeze. But I show some impatience and attempt to exit the process, by clicking on EXIT button, the screen cursor changes to a small circle and the WAIT freezes. It is not a big deal though.
UPDATE. I have just tried your approach. And - I regret to say - it works worse than before. Before, when I was showing the progress in Numbers, it would never "freeze" on my computer; only on customers computers.
Now, when changing the code to your code that shows percentage, it "freezes" on my PC at about 9%. And then the report shows. So, the process continues; it is simply that the message stops at some point.
Still, thank you for your suggestion.

I personally like to see the number of records processed. But your approach may be better for customers' perception (% vs number). I will try your approach and see how it looks.
Thank you.

>If the updates are too frequent, the wait window does not paint properly or skips altogether. I recently changed my own wait window for the same reason:
>
>
>select ("sometable")
>cTotal = str(reccount("sometable"))
>nTotal = reccount("sometable")
>iCount = 0
>go top
>
>LOCAL lnPercentage, lnPercentageNew
>lnPercentage = -1
>
>do while !eof()
>     iCount = iCount + 1
>
>     lnPercentageNew = CEILING(100 / m.nTotal * m.iCont)
>     IF m.lnPercentageNew <> m.lnPercentage
>          lnPercentage = m.lnPercentageNew
>          WAIT WINDOW TEXTMERGE("Processed <<m.lnPercentage>> % ...") NOWAIT
>     ENDIF
>
>     *--- something happens to the record in "sometable"
>     skip in ("sometable")
>enddo
>
>
>>The code is not called in a function. Here is a simplified version:
>>
>>
>>select ("sometable")
>>cTotal = str(reccount("sometable"))
>>iCount = 0
>>go top
>>do while !eof()
>>     iCount = iCount + 1
>>     wait nowait "Count " + str(iCont) + " of " + cTotal
>>     *--- something happens to the record in "sometable"
>>     skip in ("sometable")
>>enddo
>>
>>
>>
>>
>>
>>>if that code is called in a function from inside the report it should work, as previous one is deleted...
>>>(of course with a nowait in last line...)
>>>when / how do you call the Wait Window ?
>>>
>>>>I don't think so. I believe that I need DOEVENT or something like that.
>>>>
>>>>>Wait Clea
>>>>>Wait Window Recno()
>>>>>
>>>>>intended, as RecCount() should be fix?
>>>>>
>>>>>>
>>>>>>I have a report that, when generated, goes through many records (depending on the customer). To show the customer that the screen is not frozen, I have WAIT message which shows the record count. But sometimes when I run this report - on customer server, after so many records, the WAIT message stops showing the count. I know that the process goes on because after some time, the report appears.
>>>>>>
>>>>>>What code can I add to the WAIT - before or after - to make the count appear?
>>>>>>
>>>>>>TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform