Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oSay
LOCAL n := 0
DEFINE DIALOG oDlg
@ 1, 1 SAY oSay PROMPT "Counter: " + LTRIM( STR( n ) );
SIZE 200, 15
@ 2, 1 BUTTON "Start";
ACTION COUNTER( oSay, @n )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
STATIC FUNCTION COUNTER( oSay, n )
LOCAL i
FOR i = 1 TO 100
n++
oSay:Refresh()
SYSWAIT( 0.01 )
NEXT
TONE( 400, 1 )
RETURN NIL
The cause seems to be the statement
Code: Select all
::VarPut( ::cCaption )
EMG