Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET CENTURY/Timer control question
Message
De
24/03/2002 15:07:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
SET CENTURY/Timer control question
Divers
Thread ID:
00636630
Message ID:
00636630
Vues:
42
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform