Page 1 of 1

SET BACKGROUND TASKS ON , syntax error

Posted: Sun Jan 05, 2014 3:51 pm
by hynan
Hi all,

The very best wishes for this new year 2014...

I have problem with
SET BACKGROUND TASKS ON
gives syntax error

HB_IdleAdd
HB_BackGroundAdd
gives no errors.
Am trying to use someting like:

From the xHarbour Language Reference Guide.chm
// The example uses a regular background task to display the time
// once in a second while MemoEdit() is active. To ensure continuous
// display while MemoEdit() waits for user input, an idle task is
// defined which enforces background task processing.

PROCEDURE Main
LOCAL nTask, nIdle

DispOutAtSetPos( .F. )
SET BACKGROUND TASKS ON

nIdle := HB_IdleAdd( {|| HB_BackGroundRun() } )

nTask := HB_BackGroundAdd( {|| ShowTime() }, 1000 )

MemoEdit( MemoRead( "Test.prg" ), 1, 0, MaxRow()-2, MaxCOl() )

HB_BackGroundDel( nTask )
HB_IdleDel( nIdle )
RETURN


PROCEDURE ShowTime()
DispoutAt( MaxRow(), MaxCol()-7, Time() )
RETURN

Am i forgetting something or ?

Thanks in addvance,
Greetings...
( 3.2 (Stable) )

Re: SET BACKGROUND TASKS ON , syntax error

Posted: Sun Jan 05, 2014 8:27 pm
by srvet_claudio
Hi Hynan.

SET BACKGROUND TASKS ON is not a command of HMG.

Re: SET BACKGROUND TASKS ON , syntax error

Posted: Mon Jan 06, 2014 9:42 am
by hynan
Hi,

And thanks for reply,
But why is :
nIdle := HB_IdleAdd( {|| HB_BackGroundRun() } )
nTask := HB_BackGroundAdd( {|| ShowTime() }, 1000 )
gives no error ?
it seems to be valid function ?

Mvg...