SET BACKGROUND TASKS ON , syntax error

Moderator: Rathinagiri

Post Reply
hynan
Posts: 25
Joined: Sat Jun 29, 2013 7:00 pm

SET BACKGROUND TASKS ON , syntax error

Post 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) )
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: SET BACKGROUND TASKS ON , syntax error

Post by srvet_claudio »

Hi Hynan.

SET BACKGROUND TASKS ON is not a command of HMG.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
hynan
Posts: 25
Joined: Sat Jun 29, 2013 7:00 pm

Re: SET BACKGROUND TASKS ON , syntax error

Post 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...
Post Reply