Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET CENTURY/Timer control question
Message
From
24/03/2002 15:07:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
SET CENTURY/Timer control question
Miscellaneous
Thread ID:
00636630
Message ID:
00636630
Views:
43
Hi all,
Is this a known behavior of SET CENTURY ON and the Timer Control? When issue a SET CENTURY ON command, and you are typing text in the textbox, the Insertion point goes back to the start of the textbox after the timer event fires! Running VFP 7, SP1.

To replicate:
1. Copy the program below and run.
2. Type "Hello world" on the textbox. Wait and let the timer event fire.
3. No problem. The insertion point is still where it was before.
4. Uncomment the SET CENTURY ON command in the session class. Run the program. Repeat # 2.
5. This time the insertion point goes to the start of the textbox after the timer event!!!
oForm  = createobject('clsForm')
oForm.Show
oTimer = createobject('clsTimer')
read events

define class clsForm as Form
	caption = 'Timer/Century test'
	width  = 200
	height = 72
	add object txtTest as textbox with ;
		top = 24, height = 24, left = 24, width = 152
	procedure destroy
		clear events
	endproc
enddefine

define class clsSession as Session
	procedure init
		* set century on && uncomment to see problem
	endproc
enddefine

define class clsTimer as Timer
	interval = 5000
	procedure timer
		interval = 0
		wait window nowait 'Timer event'
		oSession = createobject('clsSession')
		oSession = null
		release oSession
	endproc
enddefine
ramil
~~ learning to stand still
Next
Reply
Map
View

Click here to load this message in the networking platform