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 » Sun Jan 05, 2014 3:51 pm

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: 1958
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 32 times
Been thanked: 125 times
Contact:

Post by srvet_claudio » Sun Jan 05, 2014 8:27 pm

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

Post by hynan » Mon Jan 06, 2014 9:42 am

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