Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem: NODEFAULT on Lostfocus
Message
From
14/11/2003 06:03:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Problem: NODEFAULT on Lostfocus
Miscellaneous
Thread ID:
00849791
Message ID:
00849791
Views:
68
Hi,

i try to uses NODEFAULT on textBox, but a problem occur,
when you do this, if you go out by the form, form.LostFocus and form.Deactivate not fired.

Because you cannot known when you are abandoning the form, NODEFAULT is little useful.

- Run this repro
- click on SCREEN ( you see message )
- click on form and set focus to "NO LOSTFOCUS" textbox
- click on SCREEN ( you see no message because form events not fired )
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form

	Caption = "Form1"
	Name = "FORM1"

	ADD OBJECT text2 AS textbox WITH ;
		Alignment = 3, ;
		Value = (DATE()), ;
		Height = 23, ;
		Left = 46, ;
		Top = 55, ;
		Width = 100, ;
		Name = "Text2"

	ADD OBJECT text1 AS textbox WITH ;
		Value = "NO LOSTFOCUS", ;
		Left = 44, ;
		Top = 17, ;
		Name = "Text1"

	PROCEDURE LostFocus
		WAIT WINDOW "form lostfocus"
	ENDPROC

	PROCEDURE Deactivate
		WAIT WINDOW "form deactivate"
	ENDPROC

	PROCEDURE text1.LostFocus
		NODEFAULT
	ENDPROC

ENDDEFINE
Fabio
Next
Reply
Map
View

Click here to load this message in the networking platform