Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EXTREME BUG: refresh() it is not controllable
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
EXTREME BUG: refresh() it is not controllable
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01046934
Message ID:
01046934
Vues:
70
Refresh is one of the methods more important of VFP.
The Team has inserted a flag of control for the Form and for the classes that have controlsource, but for the containers when a Refresh this arrives it cannot be stopped
and you lose the control of the program.

Result: Refresh is usable only in the objects leaf.

Comment:
Can VFP make a small effort and insert the flag in VFP9 SP1?
Do I have to do again Refresh with the BINDEVENT()?
PUBLIC oform1

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

DEFINE CLASS form1 AS form


	Height = 353
	Width = 551
	DoCreate = .T.
	AutoCenter = .T.
	Caption = "Form1"
	AllowOutput = .F.
	Name = "Form1"

	ADD OBJECT tx AS tx  WITH ;
		Height = 23, ;
		Left = 418, ;
		Top = 14, ;
		Width = 100, ;
		Name = "tx0"

	ADD OBJECT cn1 AS cn WITH ;
		Top = 6, ;
		Left = 12, ;
		Width = 204, ;
		Height = 114, ;
		BackColor = RGB(255,0,0), ;
		Name = "cn1"

	ADD OBJECT pf AS pf WITH ;
		Top = 140, ;
		Left = 30, ;
		Width = 241, ;
		Height = 169
				

	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 176, ;
		Left = 380, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Refresh", ;
		Name = "Command1"

	PROCEDURE Refresh
		?  PROGRAM()
		form::Refresh
		* only this NODEFAULT stop the process
		NODEFAULT
	ENDPROC

	PROCEDURE command1.Click
		clear
		?  "********* refresh *****"
		thisform.refresh
	ENDPROC

ENDDEFINE

DEFINE CLASS cn AS Container
	
	ADD OBJECT Tx as Tx
	
	PROCEDURE Refresh
		?  PROGRAM()
		* EXTREME BUG: this is ignored !!!!!!!!!!!!!!!!!!!!!
		NODEFAULT
	ENDPROC

ENDDEFINE

DEFINE CLASS pf AS PageFrame

	ADD OBJECT pg as pg

	PROCEDURE Refresh
		?  PROGRAM()
		* EXTREME BUG: this is ignored !!!!!!!!!!!!!!!!!!!!!
		NODEFAULT
	ENDPROC
	
ENDDEFINE

DEFINE CLASS pg AS Page
	
	ADD OBJECT Tx as Tx
	
	PROCEDURE Refresh
		?  PROGRAM()
		* EXTREME BUG: this is ignored !!!!!!!!!!!!!!!!!!!!!
		NODEFAULT
	ENDPROC	
	
ENDDEFINE

DEFINE CLASS Tx AS TextBox 

	PROCEDURE Refresh
		?  PROGRAM()
		* OK: this stop the refresh and controlsource is not read
		NODEFAULT
		
ENDDEFINE
** OUTPUT
********* refresh *****
FORM1.REFRESH
FORM1.TX0.REFRESH
FORM1.CN1.REFRESH
* BUG: THIS DOESN'T HAVE TO HAPPEN
FORM1.CN1.TX.REFRESH
FORM1.PF.REFRESH
* BUG: THIS DOESN'T HAVE TO HAPPEN
FORM1.PF.PG.REFRESH
* BUG: THIS DOESN'T HAVE TO HAPPEN
FORM1.PF.PG.TX.REFRESH
Répondre
Fil
Voir

Click here to load this message in the networking platform