The timer interval is changed after disabling/enabling

Moderator: Rathinagiri

Post Reply
User avatar
gfilatov
Posts: 1057
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

The timer interval is changed after disabling/enabling

Post by gfilatov »

Hi Roberto,

There is a small issue with a Timer interval management.
The timer interval is changed after disabling and then enabling this timer. :o

Please take a look for the following sample: :arrow:

Code: Select all

#include "minigui.ch"

Function Main

	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 400 ;
		HEIGHT 400 ;
		TITLE 'Timer Test' ;
		MAIN 

		DEFINE TIMER Timer_1 ;
		INTERVAL 10000 ;
		ACTION TimerTest() 

	END WINDOW

	Form_1.Timer_1.Value := 2000

	ACTIVATE WINDOW Form_1

Return Nil

Procedure TimerTest()

*	If time() == "11:00:00"
*		RELEASE WINDOW MAIN
*	EndIf

        // here Timer_1 inverval = 2 sec
	Form_1.Timer_1.Enabled := .F.
	MsgInfo ('Hey!')
	Form_1.Timer_1.Enabled := .T.
        // here Timer_1 inverval = 10 sec

Return
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: The timer interval is changed after disabling/enabling

Post by Roberto Lopez »

gfilatov wrote:Hi Roberto,

There is a small issue with a Timer interval management.
The timer interval is changed after disabling and then enabling this timer. :o
Thanks for the report. I'll check it ASAP.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply