The timer interval is changed after disabling/enabling

Moderator: Rathinagiri

Post Reply
User avatar
gfilatov
Posts: 509
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 7 times
Been thanked: 49 times
Contact:

The timer interval is changed after disabling/enabling

Post by gfilatov » Thu Nov 19, 2009 9:56 am

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: 3897
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 132 times

Post by Roberto Lopez » Thu Nov 19, 2009 1:19 pm

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