Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: ProgrammaticChange fire with BindControls = .F.
Message
From
15/04/2004 07:18:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
BUG: ProgrammaticChange fire with BindControls = .F.
Miscellaneous
Thread ID:
00895077
Message ID:
00895077
Views:
56
When you write on Controlsource,
VFP call ProgrammaticChange ( i do not found a documentation for this )
because Value is loaded with Controlsource expression value.

When a form start with BindControls = .F.,
all Controlsource are ignored until you set BindControls = .T. for the first time
( i found another bug#348 here ).

Then, when a form not changed a started BindControls = .F. value,
a write on Controlsource not change Value ( and this is true ),
and ProgrammaticChange it does not have to happen.

But VFP fire a ProgrammaticChange
( a bug for me until a documentation explain the logical reason of why it must happen ).
PUBLIC oform1

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

DEFINE CLASS form1 AS form

	DoCreate = .T.
	Caption = "bug#347"
	BindControls = .F.

	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "m.thisform.tag", ;
		Left = 60, ;
		Top = 31


	ADD OBJECT command1 AS commandbutton WITH ;
		Autosize = .T.,;
		Top = 31, ;
		Left = 194, ;
		Caption = "reload ControlSource"

	PROCEDURE text1.ProgrammaticChange
		WAIT windows "programmaticchange is fired with BindControls .F."
	ENDPROC

	PROCEDURE command1.Click
		thisform.text1.ControlSource = thisform.text1.ControlSource
	ENDPROC

ENDDEFINE
Reply
Map
View

Click here to load this message in the networking platform