Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer events
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00584801
Message ID:
00585050
Views:
37
>whoops, that's
>
>this.enabled=.F.

I think there is a problem here, try this code
LOCAL oFrm AS Form, oTim AS Timer

oFrm = CREATEOBJECT("tForm")
oFrm.AddObject("tTim", "tTimer")

oFrm.show()
READ EVENTS

DEFINE CLASS tForm AS Form
	Caption= "Test Timer"
	Name= "Form1"
	Height= 80
	Width= 180
	
	ADD OBJECT command1 AS CommandButton
	
	command1.caption = "Start"
	
	PROCEDURE command1.click
		thisform.tTim.interval = 1
	ENDPROC

ENDDEFINE

DEFINE CLASS tTimer AS Timer
	Name = "Timer"

	PROCEDURE Timer
		this.Interval = 0
		ACTIVATE SCREEN _SCREEN
		? DATE()
		ACTIVATE SCREEN this
	ENDPROC
ENDDEFINE
As is my understanding, this would print 1 DATE() to the _SCREEN for every click of the start button.
However it prints about 8-10

Seems wrong to me, though it could be my code, so feel free to correct me if im wrong
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform