Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 18 JUL 2011 05:24:11PM Carl Brandenburg wrote:

With one of the last upgrades (I don't remember which, 9.1 I think?) the Gas Gauge functionality of the Msg() function quit working. The gas gauge bar appears, but it's empty and stays empty until the message closes. The screen-shot below shows what the msg looks like half way through processing.

66.172.102.25_capture.jpg

I'm using the code straight out of the Programmers Reference Manual:

$Insert Msg_Equates

declare function msg

*

* to display a gauge (percent bar), use the "G" type; sub-types are C (show

* cancel button) and Y (yield on each cycle):

* 

orderCnt = 100

Def = ""

Def<MCAPTION$> = "Processing Orders..."

Def<MTYPE$ > = "GC"

Def<MEXTENT$> = OrderCnt

Def<MTEXTWIDTH$> = 200

MsgUp = Msg(@window, Def)

for Order = 1 to OrderCnt

  gosub ProcessOrder

  * update the gauge and check if cancel was pressed

  while Msg(@window, MsgUp, Order, MSGINSTUPDATE$)

next Order

retval = Msg(@window, MsgUp) ;* take down the gauge

return 0

ProcessOrder:

*

*  Process order number "OrderCnt"

*

for i = 1 to 1000000

next i

return

Any idea how I would fix this?

Thanks!

Carl


At 18 JUL 2011 07:02PM Barry Stevens wrote:

your code works in my 9.1.1 and 9.2.1


At 19 JUL 2011 11:30AM Jared Bratu wrote:

Is this Windows 7? Try throwing a Yield() in the loop processing.

But be advised the Yield() can cause other OI events to complete before the loop is done. Carl has some great information on this thread.


At 19 JUL 2011 12:48PM Carl Brandenburg wrote:

I've tested on both Windows 7 and XP. Adding a call to Yield() didn't change anything. There isn't any flickering of message dialog either for what it's worth. Thanks!

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/96a59e520004319130b308f00.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1